]> git.eshelyaron.com Git - emacs.git/commitdiff
Conditionally use macroexp-file-name in Flymake
authorBasil L. Contovounesios <contovob@tcd.ie>
Sat, 6 Mar 2021 09:05:49 +0000 (09:05 +0000)
committerBasil L. Contovounesios <contovob@tcd.ie>
Sat, 6 Mar 2021 09:05:49 +0000 (09:05 +0000)
* lisp/progmodes/flymake.el (flymake-log): Reinstate Emacs 26
support by conditionally using macroexp-file-name which is new in
Emacs 28 (bug#46957).

lisp/progmodes/flymake.el

index bd308e02203ed4d45f77cab007c88228d33cefc4..e7e746b981dd4a023777d7283b53e51119e121f6 100644 (file)
@@ -287,7 +287,9 @@ LEVEL is passed to `display-warning', which is used to display
 the warning.  If this form is included in a byte-compiled file,
 the generated warning contains an indication of the file that
 generated it."
-  (let* ((compile-file (macroexp-file-name))
+  (let* ((compile-file (or (and (fboundp 'macroexp-file-name)
+                                (macroexp-file-name))
+                           (bound-and-true-p byte-compile-current-file)))
          (sublog (if (and
                       compile-file
                       (not load-file-name))