emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8d3ed5f: Don't do compilation-transform-file-match-alist if there


From: Lars Ingebrigtsen
Subject: master 8d3ed5f: Don't do compilation-transform-file-match-alist if there's no file name
Date: Tue, 27 Oct 2020 05:17:22 -0400 (EDT)

branch: master
commit 8d3ed5f815de0e12fb11f809d295c2820643295d
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Don't do compilation-transform-file-match-alist if there's no file name
    
    * lisp/progmodes/compile.el (compilation-error-properties): There
    may not be a file name (bug#40111).  In that case, don't do the
    `compilation-transform-file-match-alist' thing.
---
 lisp/progmodes/compile.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 9188a08..de0ea42 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1242,12 +1242,12 @@ POS and RES.")
                       2)))
     ;; Remove matches like /bin/sh and do other file name transforms.
     (save-match-data
-      (let ((file-name
-             (and (consp file)
-                  (not (bufferp (car file)))
-                  (if (cdr file)
-                      (expand-file-name (car file) (cdr file))
-                    (car file)))))
+      (when-let ((file-name
+                  (and (consp file)
+                       (not (bufferp (car file)))
+                       (if (cdr file)
+                           (expand-file-name (car file) (cdr file))
+                         (car file)))))
         (cl-loop for (regexp replacement)
                  in compilation-transform-file-match-alist
                  when (string-match regexp file-name)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]