From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs 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 Message-ID: <20191013130512.GC10125@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="49980"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) To: 37733@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 13 15:06:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJdZb-000CoR-BU for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Oct 2019 15:06:11 +0200 Original-Received: from localhost ([::1]:39494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJdZZ-0007FW-UA for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Oct 2019 09:06:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42474) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJdZT-0007Am-3k for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2019 09:06:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJdZS-0003yY-4I for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2019 09:06:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJdZS-0003yM-0L for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2019 09:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iJdZR-0006tn-PA for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2019 09:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Oct 2019 13:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37733 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157097192426471 (code B ref -1); Sun, 13 Oct 2019 13:06:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Oct 2019 13:05:24 +0000 Original-Received: from localhost ([127.0.0.1]:35350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJdYn-0006sq-AR for submit@debbugs.gnu.org; Sun, 13 Oct 2019 09:05:24 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJdYl-0006sh-2v for submit@debbugs.gnu.org; Sun, 13 Oct 2019 09:05:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42329) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJdYj-0006dk-UP for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2019 09:05:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJdYi-0003fL-6L for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2019 09:05:17 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:45595 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1iJdYh-0003eW-Pg for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2019 09:05:16 -0400 Original-Received: (qmail 7711 invoked by uid 3782); 13 Oct 2019 13:05:13 -0000 Original-Received: from acm.muc.de (p2E5D5B34.dip0.t-ipconnect.de [46.93.91.52]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 13 Oct 2019 15:05:12 +0200 Original-Received: (qmail 10950 invoked by uid 1000); 13 Oct 2019 13:05:12 -0000 Content-Disposition: inline X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169116 Archived-At: In master: emacs -Q C-u M-x grep grep --color -nH --null '-syn-' *.el ; 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).