From: Lars Ingebrigtsen Date: Sun, 20 Oct 2019 10:16:56 +0000 (+0200) Subject: Fix up previous edebug breakpoint overlay change X-Git-Tag: emacs-27.0.90~968 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4503af6c9eacb2a3d9ef15748b66c6a453f797a4;p=emacs.git Fix up previous edebug breakpoint overlay change * lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): Only make the overlays in edebug mode, so that we remove them when we exit. --- diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index a19ac3bc602..e0bf52af473 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3198,12 +3198,14 @@ the breakpoint." ;; First remove all old breakpoint overlays. (edebug--overlay-breakpoints-remove start (+ start (aref offsets (1- (length offsets))))) - ;; Then make overlays for the breakpoints. - (dolist (breakpoint breakpoints) - (let* ((pos (+ start (aref offsets (car breakpoint)))) - (overlay (make-overlay pos (1+ pos)))) - (overlay-put overlay 'edebug t) - (overlay-put overlay 'face 'highlight))))) + ;; Then make overlays for the breakpoints (but only when we are in + ;; edebug mode). + (when edebug-active + (dolist (breakpoint breakpoints) + (let* ((pos (+ start (aref offsets (car breakpoint)))) + (overlay (make-overlay pos (1+ pos)))) + (overlay-put overlay 'edebug t) + (overlay-put overlay 'face 'highlight)))))) (defun edebug--overlay-breakpoints-remove (start end) (dolist (overlay (overlays-in start end))