unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37733: [PATCH]: Erroneous grep call thows exception in compilation-tear-down-arrow-spec-in-margin.
@ 2019-10-13 13:05 Alan Mackenzie
       [not found] ` <handler.37733.B.157097192426471.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Mackenzie @ 2019-10-13 13:05 UTC (permalink / raw)
  To: 37733

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).





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#37733: Acknowledgement ([PATCH]: Erroneous grep call thows exception in compilation-tear-down-arrow-spec-in-margin.)
       [not found] ` <handler.37733.B.157097192426471.ack@debbugs.gnu.org>
@ 2019-10-13 13:22   ` Alan Mackenzie
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Mackenzie @ 2019-10-13 13:22 UTC (permalink / raw)
  To: 37733-done

Bug fixed in the master branch.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-13 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-13 13:05 bug#37733: [PATCH]: Erroneous grep call thows exception in compilation-tear-down-arrow-spec-in-margin Alan Mackenzie
     [not found] ` <handler.37733.B.157097192426471.ack@debbugs.gnu.org>
2019-10-13 13:22   ` bug#37733: Acknowledgement ([PATCH]: Erroneous grep call thows exception in compilation-tear-down-arrow-spec-in-margin.) Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).