diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-10-20 10:51:08 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-10-20 10:51:08 +0200 |
commit | cfaecdb293cbe19536232bcef8ead9f8e98af2ff (patch) | |
tree | 4d4799333da60a98653b4e8e72ff6217fd11e9d1 /lisp/emacs-lisp/edebug.el | |
parent | 27490cec4e258d344c3e192301a18e36c52576a6 (diff) | |
download | emacs-cfaecdb293cbe19536232bcef8ead9f8e98af2ff.tar.gz |
Fix doc string and interactive spec of cancel-edebug-on-entry
* 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.
Diffstat (limited to 'lisp/emacs-lisp/edebug.el')
-rw-r--r-- | lisp/emacs-lisp/edebug.el | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index bfec807b5c8..85c56f43486 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3419,14 +3419,37 @@ instrumented. Then it does `edebug-on-entry' and switches to `go' mode." (defun edebug-on-entry (function &optional flag) "Cause Edebug to stop when FUNCTION is called. + +FUNCTION needs to be edebug-instrumented for this to work; if +FUNCTION isn't, this function has no effect. + With prefix argument, make this temporary so it is automatically canceled the first time the function is entered." (interactive "aEdebug on entry to: \nP") ;; Could store this in the edebug data instead. (put function 'edebug-on-entry (if flag 'temp t))) +(defalias 'edebug-cancel-edebug-on-entry #'cancel-edebug-on-entry) + (defun cancel-edebug-on-entry (function) - (interactive "aEdebug on entry to: ") + "Cause Edebug to not stop when FUNCTION is called. +The removes the effect of `edebug-on-entry'." + (interactive + (list (let ((name (completing-read + "Cancel edebug on entry to: " + (let ((functions nil)) + (mapatoms + (lambda (symbol) + (when (and (fboundp symbol) + (get symbol 'edebug-on-entry)) + (push symbol functions))) + obarray) + (unless functions + (error "No functions have `edebug-on-entry'.")) + functions)))) + (when (and name + (not (equal name ""))) + (intern name))))) (put function 'edebug-on-entry nil)) |