diff options
| author | Lars Ingebrigtsen | 2019-10-20 13:40:03 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-10-20 13:40:03 +0200 |
| commit | 23b30327020c3f59691fbb20f061691c7bb15bdd (patch) | |
| tree | a101fcbc8d57a6ed85205c97a7fc968bc2b1d6e1 /lisp | |
| parent | a4e7c15484a9330fb9e1a1b425fcf1b37bad04e1 (diff) | |
| download | emacs-23b30327020c3f59691fbb20f061691c7bb15bdd.tar.gz emacs-23b30327020c3f59691fbb20f061691c7bb15bdd.zip | |
New command to clear all breakpoints in a function
* doc/lispref/edebug.texi (Breakpoints): Mention it.
* lisp/emacs-lisp/edebug.el (edebug-unset-breakpoints): New
command and keystroke.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 68b2126345f..f59123094ac 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -3249,6 +3249,17 @@ With prefix argument, make it a temporary breakpoint." | |||
| 3249 | (interactive) | 3249 | (interactive) |
| 3250 | (edebug-modify-breakpoint nil)) | 3250 | (edebug-modify-breakpoint nil)) |
| 3251 | 3251 | ||
| 3252 | (defun edebug-unset-breakpoints () | ||
| 3253 | "Unset all the breakpoints in the current form." | ||
| 3254 | (interactive) | ||
| 3255 | (let* ((name (edebug-form-data-symbol)) | ||
| 3256 | (breakpoints (nth 1 (get name 'edebug)))) | ||
| 3257 | (unless breakpoints | ||
| 3258 | (user-error "There are no breakpoints in %s" name)) | ||
| 3259 | (save-excursion | ||
| 3260 | (dolist (breakpoint breakpoints) | ||
| 3261 | (goto-char (nth 3 breakpoint)) | ||
| 3262 | (edebug-modify-breakpoint nil))))) | ||
| 3252 | 3263 | ||
| 3253 | (defun edebug-set-global-break-condition (expression) | 3264 | (defun edebug-set-global-break-condition (expression) |
| 3254 | "Set `edebug-global-break-condition' to EXPRESSION." | 3265 | "Set `edebug-global-break-condition' to EXPRESSION." |
| @@ -3756,6 +3767,7 @@ be installed in `emacs-lisp-mode-map'.") | |||
| 3756 | ;; breakpoints | 3767 | ;; breakpoints |
| 3757 | (define-key map "b" 'edebug-set-breakpoint) | 3768 | (define-key map "b" 'edebug-set-breakpoint) |
| 3758 | (define-key map "u" 'edebug-unset-breakpoint) | 3769 | (define-key map "u" 'edebug-unset-breakpoint) |
| 3770 | (define-key map "U" 'edebug-unset-breakpoints) | ||
| 3759 | (define-key map "B" 'edebug-next-breakpoint) | 3771 | (define-key map "B" 'edebug-next-breakpoint) |
| 3760 | (define-key map "x" 'edebug-set-conditional-breakpoint) | 3772 | (define-key map "x" 'edebug-set-conditional-breakpoint) |
| 3761 | (define-key map "X" 'edebug-set-global-break-condition) | 3773 | (define-key map "X" 'edebug-set-global-break-condition) |