[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 9946def: In compilation-tear-down-arrow-spec-in-mar
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] master 9946def: In compilation-tear-down-arrow-spec-in-margin, test compilation-arrow-overlay |
Date: |
Sun, 13 Oct 2019 09:19:05 -0400 (EDT) |
branch: master
commit 9946defe21f2f9b902e5eb86e31aca710e369db1
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
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.
---
lisp/progmodes/compile.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 505e091..7d7a1b9 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2670,10 +2670,11 @@ Actual value is never used, only the text property.")
(defun compilation-tear-down-arrow-spec-in-margin ()
"Restore compilation-arrow-overlay to not using the margin, which is
removed."
- (overlay-put compilation-arrow-overlay 'before-string nil)
- (delete-overlay compilation-arrow-overlay)
- (setq compilation-arrow-overlay nil)
- (set-window-margins (selected-window) (- (car (window-margins)) 2)))
+ (when (overlayp compilation-arrow-overlay)
+ (overlay-put compilation-arrow-overlay 'before-string nil)
+ (delete-overlay compilation-arrow-overlay)
+ (setq compilation-arrow-overlay nil)
+ (set-window-margins (selected-window) (- (car (window-margins)) 2))))
(defun compilation-set-overlay-arrow (w)
"Set up, or switch off, the overlay-arrow for window W."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 9946def: In compilation-tear-down-arrow-spec-in-margin, test compilation-arrow-overlay,
Alan Mackenzie <=