summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/edebug.el
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* Rename coverage symbols in edebug to avoid collisionsLars Ingebrigtsen2019-07-271-5/+5
| | | | | | | | * lisp/emacs-lisp/edebug.el (edebug-clear-coverage): Use edebug-unknown and edebug-ok-coverage instead of unknown and ok-coverage to avoid naming collisions with packages that use those two symbols (bug#25471). (edebug--update-coverage, edebug-display-freq-count): Ditto.
* Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-251-0/+1
| | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-191-1/+0
| | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* * lisp/emacs-lisp/edebug.el: Better handle instrumentation of `end-of-defun`Stefan Monnier2019-05-011-51/+34
| | | | | | Remove redundant :group args. (edebug-read-top-level-form): Let-bind edebug-active. (edebug-active): Move before this new first use.
* * lisp/subr.el (setq-default): Define as a macroStefan Monnier2019-04-011-1/+0
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-setq-default): Delete. (byte-compile-set-default): Inline the part that it used. * lisp/emacs-lisp/edebug.el (setq-default): Remove the debug spec. * src/data.c (Fsetq_default): Delete. (syms_of_data): Don't register.
* Make edebug-eval-expression support code completionFederico Tedin2019-03-221-3/+1
| | | | | * lisp/emacs-lisp/edebug.el (edebug-eval-expression): Use read--expression instead of read-from-minibuffer. (Bug#34065)
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Merge from origin/emacs-26Glenn Morris2018-11-201-2/+2
|\| | | | | | | d667318 (origin/emacs-26) Fix two Edebug defcustoms (bug#33428)
| * Fix two Edebug defcustoms (bug#33428)Stephen Berman2018-11-191-2/+2
| | | | | | | | | | | | * lisp/emacs-lisp/edebug.el (edebug-print-length) (edebug-print-level): Fix customization type to allow setting the documented valid value nil via the Customize interface.
* | edebug.el: Move window focus switch into edebug-pop-to-bufferAlan Mackenzie2018-10-231-15/+9
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/follow.el (edebug-focus-frame): Remove. (edebug-pop-to-buffer): Call x-focus-frame for GUI frames. (edebug-default-enter, edebug--display-1): Replace call to edebug-focus-frame with x-focus-frame. (edebug-where, edebug-bounce-point, edebug-visit-eval-list): Remove no longer needed calls to edebug-focus-frame.