[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37733: [PATCH]: Erroneous grep call thows exception in compilation-t
From: |
Alan Mackenzie |
Subject: |
bug#37733: [PATCH]: Erroneous grep call thows exception in compilation-tear-down-arrow-spec-in-margin. |
Date: |
Sun, 13 Oct 2019 13:05:12 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
In master:
emacs -Q
C-u M-x grep <CR>
grep --color -nH --null '-syn-' *.el <CR> ; Note the '-syn-' is
; interpreted by grep as flags.
This throws an exception.
Fix as follows:
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index e312def18d..25c8a4d067 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2669,10 +2669,11 @@ compilation-set-up-arrow-spec-in-margin
(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."
.
--
Alan Mackenzie (Nuremberg, Germany).
- bug#37733: [PATCH]: Erroneous grep call thows exception in compilation-tear-down-arrow-spec-in-margin.,
Alan Mackenzie <=