summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-10-20 13:40:03 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-10-20 13:40:03 +0200
commit23b30327020c3f59691fbb20f061691c7bb15bdd (patch)
treea101fcbc8d57a6ed85205c97a7fc968bc2b1d6e1 /lisp/emacs-lisp
parenta4e7c15484a9330fb9e1a1b425fcf1b37bad04e1 (diff)
downloademacs-23b30327020c3f59691fbb20f061691c7bb15bdd.tar.gz
emacs-23b30327020c3f59691fbb20f061691c7bb15bdd.tar.bz2
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/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/edebug.el12
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."
(interactive)
(edebug-modify-breakpoint nil))
+(defun edebug-unset-breakpoints ()
+ "Unset all the breakpoints in the current form."
+ (interactive)
+ (let* ((name (edebug-form-data-symbol))
+ (breakpoints (nth 1 (get name 'edebug))))
+ (unless breakpoints
+ (user-error "There are no breakpoints in %s" name))
+ (save-excursion
+ (dolist (breakpoint breakpoints)
+ (goto-char (nth 3 breakpoint))
+ (edebug-modify-breakpoint nil)))))
(defun edebug-set-global-break-condition (expression)
"Set `edebug-global-break-condition' to EXPRESSION."
@@ -3756,6 +3767,7 @@ be installed in `emacs-lisp-mode-map'.")
;; breakpoints
(define-key map "b" 'edebug-set-breakpoint)
(define-key map "u" 'edebug-unset-breakpoint)
+ (define-key map "U" 'edebug-unset-breakpoints)
(define-key map "B" 'edebug-next-breakpoint)
(define-key map "x" 'edebug-set-conditional-breakpoint)
(define-key map "X" 'edebug-set-global-break-condition)