summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/edebug.el
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/emacs-lisp/edebug.el: Tweak last changeStefan Monnier2021-02-101-37/+22
| | | | | | | | | | | | | | | Use generic functions i.s.o `edebug--spec-op-function`. <toplevel>: No need to register the &foo and :foo handler any more. (edebug--handle-&-spec-op, edebug--handle-:-spec-op): New generic functions. (edebug-match-specs): Use them. (edebug--get-spec-op): Remove function. (edebug-match-&optional, edebug-match-&rest, edebug-match-&or) (edebug-match-&not, edebug-match-&key, edebug-match-&error) (edebug-match-&define): Turn functions into methods of `edebug--handle-&-spec-op`. (edebug-match-:name, edebug-match-:unique): Turn functions into methods of `edebug--handle-:-spec-op`.
* * list/emacs-lisp/edebug.el: Don't overload `edebug-form-spec`Stefan Monnier2021-02-101-13/+28
| | | | | | | | | | | | | | | | | | The `edebug-form-spec` symbol property was used to store two different things: the handlers for spec elements like `body` and the handlers for spec operators like `&or`. But these two sets use different calling conventions, so they're fundamentally incompatible. So, move the handlers to spec operators to the new property `edebug--spec-op-function`. This unbreaks Edebugging of: (cl-flet ((f (&rest x) x)) 3) * lisp/emacs-lisp/edebug.el <toplevel>: Split the alist of built in spec elements into normal spec element and spec ops. (edebug--get-spec-op): New function. (edebug-match-specs): Use it. (edebug-match-:name): Rename from `edebug-match-colon-name`.
* Move all usages of `values' to `values--store-value'Lars Ingebrigtsen2021-02-091-3/+4
| | | | | | | | | | | | | * lisp/simple.el (eval-expression): * lisp/progmodes/elisp-mode.el (eval-last-sexp): * lisp/emacs-lisp/pp.el (pp-eval-expression): * lisp/emacs-lisp/edebug.el (edebug-eval-expression): * lisp/emacs-lisp/pp.el (pp-eval-expression): * lisp/emacs-lisp/edebug.el (edebug-eval-expression): * lisp/cedet/data-debug.el (data-debug-eval-expression): Use it instead of pushing to `values' directly (bug#22066). * lisp/subr.el (values--store-value): New function.
* Remove XEmacs compat code from edebug.elStefan Kangas2021-02-041-11/+14
| | | | | * lisp/emacs-lisp/edebug.el (edebug-window-live-p, edebug-mark): Make obsolete. Update callers.
* Prefer defvar-local in emacs-lisp/*.elStefan Kangas2021-01-311-2/+1
| | | | | | | | | | | | * lisp/emacs-lisp/chart.el (chart-local-object): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode) (define-globalized-minor-mode): * lisp/emacs-lisp/edebug.el: * lisp/emacs-lisp/generic.el (generic-font-lock-keywords): * lisp/emacs-lisp/re-builder.el (reb-regexp, reb-regexp-src) (reb-overlays): * lisp/emacs-lisp/syntax.el (syntax-propertize-extend-region-functions): Prefer defvar-local.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Improve the edebug-form-data doc stringLars Ingebrigtsen2020-12-261-1/+1
| | | | | * lisp/emacs-lisp/edebug.el (edebug-form-data): Doc string clarification (bug#42776).
* Don't quote lambdas in emacs-lisp/*.elStefan Kangas2020-11-161-11/+9
| | | | | | | | | | | | * lisp/emacs-lisp/cl-seq.el (cl--parsing-keywords, cl-sort): * lisp/emacs-lisp/cl-macs.el (cl-typecase): * lisp/emacs-lisp/cl-extra.el (cl-some, cl-every) (cl--map-keymap-recursively): * lisp/emacs-lisp/advice.el (ad-insert-argument-access-forms): * lisp/emacs-lisp/edebug.el (edebug-sort-alist) (edebug-set-windows): * lisp/emacs-lisp/pp.el (pp-display-expression): * lisp/emacs-lisp/regi.el (regi-interpret): Don't quote lambdas.
* Remove mention of `edebug-on-signal' from a doc stringLars Ingebrigtsen2020-11-121-1/+0
| | | | | * lisp/emacs-lisp/edebug.el (edebug-mode): Don't mention non-existent user option (bug#44577).
* Remove some Emacs 19 compat code and referencesStefan Kangas2020-10-251-9/+8
| | | | | | | | | | | | * lisp/progmodes/sql.el: * lisp/mh-e/mh-show.el (mh-display-msg): Remove Emacs 19 compat code. * lisp/emacs-lisp/edebug.el (edebug-mark-marker): Make into obsolete alias for mark-marker. (edebug--display-1, edebug-bounce-point) (edebug-outside-excursion): Adjust callers. * lisp/net/snmp-mode.el: * lisp/forms.el: Remove references to Emacs 19. (forms-use-text-properties): Doc fix.
* Remove some references to Emacs 18 and 19Stefan Kangas2020-10-161-1/+0
| | | | | | | * doc/misc/forms.texi (Modifying Forms Contents, Error Messages): * lisp/arc-mode.el: * lisp/emacs-lisp/edebug.el (edebug-temp-display-freq-count): * lisp/type-break.el: Remove some references to Emacs 18 and 19.
* Avoid some uses of obsolete function interactive-pStefan Kangas2020-08-241-1/+1
| | | | | | | | | | | * doc/lispref/help.texi (Accessing Documentation): * lisp/cedet/data-debug.el: * lisp/emacs-lisp/edebug.el (edebug-wrap-def-body): * lisp/simple.el (append-next-kill): * test/manual/cedet/cedet-utests.el (cedet-utest, pulse-test): * test/manual/cedet/semantic-tests.el (semantic-lex-spp-write-utest) (semantic-symref-test-count-hits-in-tag): Use 'called-interactively-p' instead of obsolete function 'interactive-p'.
* Avoid duplicate Edebug symbols when backtracking (Bug#42701)Philipp Stephani2020-08-031-0/+7
| | | | | | | | | | | | | | When Edebug backtracks, it nevertheless generates definitions for the non-matching branches, see Bug#41988 and Bug#42701. This should be fixed eventually (probably by deferring the definition until a branch is known to match), but for now add a band-aid to avoid these duplicate symbols, at least for anonymous forms. * lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): Regenerate anonymous names. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-duplicate-symbol-backtrack): New regression test.
* Avoid duplicate Edebug symbols when using ‘cl-flet’ (Bug#41989)Philipp Stephani2020-08-021-0/+12
| | | | | | | | | | | | | | * lisp/emacs-lisp/edebug.el (edebug-match-:unique): Add a new ‘:unique’ specifier to generate unique names. * lisp/emacs-lisp/cl-macs.el (cl-flet): Use it. This requires inlining the ‘cl-defun’ specification. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-cl-flet): New unit test. * doc/lispref/edebug.texi (Specification List): Document new ‘:unique’ construct.
* Don’t generate duplicate symbols for secondary CL methods (Bug#42671)Philipp Stephani2020-08-021-0/+12
| | | | | | | | | | | * lisp/emacs-lisp/edebug.el (edebug-match-cl-generic-method-qualifier): Add matcher for ‘cl-defmethod’ qualifier. * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Use it. * test/lisp/emacs-lisp/edebug-tests.el (edebug-cl-defmethod-qualifier): New unit test.
* Declare some ancient compat aliases obsolete (Bug#41328)Stefan Kangas2020-07-311-1/+1
| | | | | | | | | | | | * lisp/comint.el (comint-read-noecho): * lisp/emacs-lisp/edebug.el (edebug-all-defuns): * lisp/man.el (manual-entry): * lisp/vc/log-edit.el (vc-log-mode-map, vc-log-entry-mode): Declare ancient backwards-compatibility aliases and functions obsolete. The oldest in this list was added in 1992, and the most recent in 2004. * lisp/net/telnet.el (telnet-initial-filter): Don't use `comint-read-noecho'.
* Fix bug #40992 whilst still allowing breakpoint highlights in edebugAlan Mackenzie2020-05-111-15/+38
| | | | | | | | | | | | | | | | | | | | | | | Strategy: when an instrumented function gets re-evaluated, save the former value of its symbol's `edebug' property in the new propery `ghost-edebug'. If this function is still being edebugged, edebug will then access its info from this new property. Also fix the bug whereby compile-defun'ing an instrumented function prevents the function being re-instrumented by I (edebug-instrument-callee). * lisp/emacs-lisp/edebug.el (edebug-get-edebug-or-ghost): New function. (edebug-read-and-maybe-wrap-form1): save value of `edebug' property in 'ghost-edebug'. (edebug-make-form-wrapper): Set value of `ghost-edebug' to nil. (edebug-make-form-wrapper, edebug-find-stop-point, edebug-next-break-point) (edebug-modify-breakpoint, edebug--overlay-breakpoints, edebug-set-breakpoint) (edebug-unset-breakpoints, edebug-toggle-disable-breakpoint) (edebug--backtrace-goto-source, edebug-display-freq-count) (edebug-set-conditional-breakpoint): Use edebug-get-edebug-or-ghost to access edebug information. (edebug-instrument-function): Also check a function is a cons before declaring it "already instrumented".
* Fix bug #40766, an error in edebug spec handlingAlan Mackenzie2020-04-241-4/+1
| | | | | | | | | | Also remove some debris. * lisp/emacs-lisp/edebug.el (edebug-spec): Move the entry for edebug-spec-list to before that for vector in the &or form. This assures that in a dotted list of vectors, that list gets handled correctly by edebug-spec-list rather than wrongly by (vector ...). (def-edebug-spec &key): Remove, since it is ill formed and superfluous.
* Remove obsolete XEmacs commentStefan Kangas2020-03-211-1/+0
| | | | | * lisp/emacs-lisp/edebug.el (edebug--display-1): Remove comment regarding an XEmacs exclusive variable.
* Introduce element &error into edebug specification lists for macrosAlan Mackenzie2020-01-171-0/+12
| | | | | | | | | | | | | | | This fixes bug #37540. * lisp/emacs-lisp/edebug.el (top level): New entry for &error in alist used to associate elements with their handling functions. (edebug-match-&error): New function. (nested-backquote-form): Use the new element &error to abort instrumentation on encountering a three deep nesting of backquotes (without intervening commas). * doc/lispref/edebug.texi (Specification List): Add an entry for &error. * etc/NEWS: Add an entry for &error.
* edebug: remove ancient code for ancient XEmacs support libsGlenn Morris2020-01-161-12/+0
| | | | | | * lisp/emacs-lisp/edebug.el (edebug--require-cl-read): Remove. (edebug-setup-hook, cl-read-load-hooks): Don't modify. (edebug-unload-function): Don't modify cl-read-load-hooks.
* Merge from origin/emacs-27Paul Eggert2020-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | 186152ba40 Pacify gcc -Wunused-function on Ubuntu 18.04.3 4cd143aded Fix copyright years by hand 365e01cc9f Update copyright year to 2020 cd2c156163 ; * etc/NEWS: Make the description of XDG fallback more ac... # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex
| * Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* | Don't bind XEmacs-only variable in edebugLars Ingebrigtsen2019-12-251-3/+1
|/ | | | | * lisp/emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Remove binding of XEmacs-only variable print-readably.
* * lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Use 'user-error'.Juri Linkov2019-12-131-1/+1
|
* Fix edebug instrumentation removing from advised functionsMichael Heerdegen2019-11-231-6/+22
| | | | | * lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Handle advised functions correctly.
* Make edebug-remove-instrumentation remove macro instrumentationLars Ingebrigtsen2019-11-151-2/+3
| | | | | | * lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Macros can also have edebug instrumentation, so remove that as well (bug#38195).
* Allow using edebug-remove-instrumentation more fine-grainedLars Ingebrigtsen2019-11-141-17/+31
| | | | | | * lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Prompt the user for what functions to remove instrumentation from a la cancel-edebug-on-entry (bug#38195).
* Really enable setting a breakpoint without instrumenting firstLars Ingebrigtsen2019-11-011-1/+3
| | | | | * lisp/emacs-lisp/edebug.el (edebug-set-breakpoint): Really enable setting a breakpoint without instrumenting first (bug#23469).
* Make edebug-eval-last-sexp interactively take a zero prefixLars Ingebrigtsen2019-10-221-10/+29
| | | | | | * lisp/emacs-lisp/edebug.el (edebug-eval-last-sexp): Make the zero prefix work analogously to in eval-last-sexp (bug#28895). (edebug-eval-print-last-sexp): Ditto.
* Tiny clean-up of previous edebug patchLars Ingebrigtsen2019-10-211-1/+1
| | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): Clean up code slightly.
* Ensure we always remove the breakpoint overlaysLars Ingebrigtsen2019-10-211-1/+1
| | | | | | * lisp/emacs-lisp/edebug.el (edebug--display-1): Remove the overlays here -- this cleans up after exiting no matter how we exited.
* Add fringe markers to edebug breakpointsLars Ingebrigtsen2019-10-211-5/+18
| | | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): Set a fringe element to mark the breakpoint. (edebug-breakpoint): Fringe marker.
* Add a command to toggle an edebug breakpointLars Ingebrigtsen2019-10-201-4/+39
| | | | | | | | | | * doc/lispref/edebug.texi (Breakpoints): Document this. * lisp/emacs-lisp/edebug.el (edebug-disabled-breakpoint): New face (bug#23472). (edebug-enabled-breakpoint): Rename. (edebug--overlay-breakpoints): Use the new face. (edebug-toggle-disable-breakpoint): New command and keystroke.
* Make edebug-mode-map take precedenceLars Ingebrigtsen2019-10-201-2/+6
| | | | | | * lisp/emacs-lisp/edebug.el (edebug--recursive-edit): Bind minor-mode-overriding-map-alist to avoid other minor modes hiding the edebug commands (bug#11018).
* Fix edebug--restore-breakpoints re-instrumentinging bug-outLars Ingebrigtsen2019-10-201-17/+18
| | | | | * lisp/emacs-lisp/edebug.el (edebug--restore-breakpoints): Don't bug out when instrumenting/de-instrumenting/re-instrumenting.
* Add a new edebug-breakpoint faceLars Ingebrigtsen2019-10-201-1/+4
| | | | | | * doc/lispref/edebug.texi (Breakpoints): Mention it. * lisp/emacs-lisp/edebug.el (edebug-breakpoint): New face.
* New command to clear all breakpoints in a functionLars Ingebrigtsen2019-10-201-0/+12
| | | | | | | * doc/lispref/edebug.texi (Breakpoints): Mention it. * lisp/emacs-lisp/edebug.el (edebug-unset-breakpoints): New command and keystroke.
* Preserve breakpoints when Edebug-reinstrumenting functionsLars Ingebrigtsen2019-10-201-6/+27
| | | | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): New function (bug#23470). * lisp/emacs-lisp/seq.el (seq-position): Autoload.
* Change default to cancel all edebug-on-entry in cancel-edebug-on-entryLars Ingebrigtsen2019-10-201-11/+20
| | | | | * lisp/emacs-lisp/edebug.el (cancel-edebug-on-entry): Make the default to cancel all edebug-on-entry.
* Use user-error in cancel-edebug-on-entryLars Ingebrigtsen2019-10-201-1/+1
| | | | | * lisp/emacs-lisp/edebug.el (cancel-edebug-on-entry): This is a user-class error, so use user-error.
* Instrument function if it hasn't been already in edebug-set-breakpointLars Ingebrigtsen2019-10-201-0/+5
| | | | | * lisp/emacs-lisp/edebug.el (edebug-set-breakpoint): Instrument form automatically when using this function (bug#23469).
* Fix up previous edebug breakpoint overlay changeLars Ingebrigtsen2019-10-201-6/+8
| | | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): Only make the overlays in edebug mode, so that we remove them when we exit.
* Mark breakpoints in edebug with highlightsLars Ingebrigtsen2019-10-201-1/+23
| | | | | | | | * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints) (edebug--overlay-breakpoints-remove): New functions (bug#23468). (edebug-modify-breakpoint): Use them to highlight breakpoints. (edebug--display-1): Restore breakpoint highlights. (edebug--recursive-edit): Remove highlights on exit.
* New command edebug-remove-instrumentationLars Ingebrigtsen2019-10-201-0/+18
| | | | | | | * doc/lispref/edebug.texi (Instrumenting): Document it. * lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): New command (bug#15843).
* Fix doc string and interactive spec of cancel-edebug-on-entryLars Ingebrigtsen2019-10-201-1/+24
| | | | | | | | * lisp/emacs-lisp/edebug.el (cancel-edebug-on-entry): Add doc string and make the interactive spec complete over functions that have the spec (bug#10806). (edebug-cancel-edebug-on-entry): Add alias for discoverability. (edebug-on-entry): Clarify what this command does.
* lisp/*.el: Force non-nil result to t, to match docstringJuanma Barranquero2019-10-171-1/+2
| | | | | | | | | | | | | * lisp/emacs-lock.el (emacs-lock-live-process-p): * lisp/shadowfile.el (shadow-file-match): * lisp/emacs-lisp/edebug.el (edebug-basic-spec): * lisp/mail/rmail.el (rmail-expunge-confirmed): * lisp/net/soap-client.el (soap-should-encode-value-for-xs-element): * lisp/progmodes/idlwave.el (idlwave-quoted): * lisp/progmodes/idlw-shell.el (idlwave-shell-filename-string): * lisp/textmodes/refbib.el (r2b-isa-proceedings): * lisp/textmodes/texnfo-upd.el (texinfo-find-lower-level-node): Normalize boolean result.
* Allow global-edebug-prefix to be nilLars Ingebrigtsen2019-10-091-2/+3
| | | | | | * lisp/emacs-lisp/edebug.el (global-edebug-prefix): Allow global-edebug-prefix to be nil (if the user doesn't want that prefix) (bug#25188).
* New edebug-spec, nested-backquote-form. This fixes bug #31090Alan Mackenzie2019-09-241-0/+13
| | | | | | | * lisp/emacs-lisp/edebug.el: (nested-backquote-form): a new edebug-spec which handles nested backquote structures without a , or ,@ "between" the outer and inner backquotes. (backquote-form): Use nested-backquote-form.
* edebug.el comment fixLars Ingebrigtsen2019-07-271-1/+1
| | | | | * lisp/emacs-lisp/edebug.el: Fix comment referring to non-existent variable (bug#25188).