branch: externals/compat
commit 53d489100b9d401b32b875391940dac08116361c
Author: Philip Kaludercic <phil...@posteo.net>
Commit: Philip Kaludercic <phil...@posteo.net>

    Fall back onto buffer-file-name if macroexp-file-name fails
---
 compat.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/compat.el b/compat.el
index 323cb80688..dbab490905 100644
--- a/compat.el
+++ b/compat.el
@@ -58,11 +58,11 @@
              (file (expand-file-name
                     (format "compat-%d.el" version)
                     (file-name-directory
-                     (if (fboundp 'macroexp-file-name)
-                         (macroexp-file-name)
-                       (or (bound-and-true-p byte-compile-current-file)
-                           load-file-name
-                           (buffer-file-name))))))
+                     (or (if (fboundp 'macroexp-file-name)
+                             (macroexp-file-name)
+                           (or (bound-and-true-p byte-compile-current-file)
+                               load-file-name))
+                         (buffer-file-name)))))
              defs)
         (with-temp-buffer
           (insert-file-contents file)

Reply via email to