From 4503af6c9eacb2a3d9ef15748b66c6a453f797a4 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 20 Oct 2019 12:16:56 +0200 Subject: [PATCH] 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. --- lisp/emacs-lisp/edebug.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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)) -- 2.39.2