]> git.eshelyaron.com Git - emacs.git/commitdiff
Instrument function if it hasn't been already in edebug-set-breakpoint
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 20 Oct 2019 10:25:59 +0000 (12:25 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 20 Oct 2019 10:25:59 +0000 (12:25 +0200)
* lisp/emacs-lisp/edebug.el (edebug-set-breakpoint): Instrument
form automatically when using this function (bug#23469).

lisp/emacs-lisp/edebug.el

index e0bf52af4736b2904b9597eca63b1dfe4c056a61..ef138ba35f2f4775c0781d9d779cbfed2d03c1f8 100644 (file)
@@ -3216,6 +3216,11 @@ the breakpoint."
   "Set the breakpoint of nearest sexp.
 With prefix argument, make it a temporary breakpoint."
   (interactive "P")
+  ;; If the form hasn't been instrumented yet, do it now.
+  (when (and (not edebug-active)
+            (let ((data (get (edebug-form-data-symbol) 'edebug)))
+              (or (null data) (markerp data))))
+    (edebug-defun))
   (edebug-modify-breakpoint t nil arg))
 
 (defun edebug-unset-breakpoint ()