diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-10-12 20:57:37 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-10-12 20:57:43 +0200 |
commit | 981f1358f0332db06cac325e640ce7570662a72b (patch) | |
tree | 5d34d905ff090660483bd2ff18cf3139b3368efc /lisp/progmodes/compile.el | |
parent | 193ece8d32e6acb757c09d9a575603b830cf9afa (diff) | |
download | emacs-981f1358f0332db06cac325e640ce7570662a72b.tar.gz |
Fix compilation-transform-file-match-alist failure
* lisp/progmodes/compile.el (compilation-error-properties): Fix
thinko in compilation-transform-file-match-alist feature -- `file'
isn't a list of files after all.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r-- | lisp/progmodes/compile.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index e312def18d0..505e0917dcb 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1181,18 +1181,19 @@ POS and RES.") 2))) ;; Remove matches like /bin/sh and do other file name transforms. (save-match-data - (let ((transformed nil)) - (dolist (f file) - (let ((match - (cl-loop for (regexp replacement) - in compilation-transform-file-match-alist - when (string-match regexp f) - return (or replacement t)))) - (cond ((not match) - (push f transformed)) - ((stringp match) - (push (replace-match match nil nil f) transformed))))) - (setq file (nreverse transformed)))) + (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) + return (if replacement + (setq file (list (replace-match replacement nil nil + file-name))) + (setq file nil))))) (if (not file) ;; If we ignored all the files with errors on this line, then ;; return nil. |