aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2019-10-13 13:15:35 +0000
committerAlan Mackenzie2019-10-13 13:18:00 +0000
commit9946defe21f2f9b902e5eb86e31aca710e369db1 (patch)
treec1b3a8f81679bfcaae33aa2a1a61038fdbc4f2f9
parentf113ae59222dbb0961a34c1e0913cf0f3104a567 (diff)
downloademacs-9946defe21f2f9b902e5eb86e31aca710e369db1.tar.gz
emacs-9946defe21f2f9b902e5eb86e31aca710e369db1.zip
In compilation-tear-down-arrow-spec-in-margin, test compilation-arrow-overlay
* lisp/progmodes/compile.el (compilation-tear-down-arrow-spec-in-margin): Make sure compilation-arrow-overlay is an overlay before performing overlay operations on it. This fixes bug #37733.
-rw-r--r--lisp/progmodes/compile.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 505e0917dcb..7d7a1b99d97 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2670,10 +2670,11 @@ Actual value is never used, only the text property.")
2670 2670
2671(defun compilation-tear-down-arrow-spec-in-margin () 2671(defun compilation-tear-down-arrow-spec-in-margin ()
2672 "Restore compilation-arrow-overlay to not using the margin, which is removed." 2672 "Restore compilation-arrow-overlay to not using the margin, which is removed."
2673 (overlay-put compilation-arrow-overlay 'before-string nil) 2673 (when (overlayp compilation-arrow-overlay)
2674 (delete-overlay compilation-arrow-overlay) 2674 (overlay-put compilation-arrow-overlay 'before-string nil)
2675 (setq compilation-arrow-overlay nil) 2675 (delete-overlay compilation-arrow-overlay)
2676 (set-window-margins (selected-window) (- (car (window-margins)) 2))) 2676 (setq compilation-arrow-overlay nil)
2677 (set-window-margins (selected-window) (- (car (window-margins)) 2))))
2677 2678
2678(defun compilation-set-overlay-arrow (w) 2679(defun compilation-set-overlay-arrow (w)
2679 "Set up, or switch off, the overlay-arrow for window W." 2680 "Set up, or switch off, the overlay-arrow for window W."