branch: externals/compat
commit 021cf5f4be2f418554ad1adf761dce6bd9aaf5b2
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Philip Kaludercic <phil...@posteo.net>

    Use macroexp-file-name if available
---
 compat.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/compat.el b/compat.el
index 7a9c2e4b69..323cb80688 100644
--- a/compat.el
+++ b/compat.el
@@ -58,9 +58,11 @@
              (file (expand-file-name
                     (format "compat-%d.el" version)
                     (file-name-directory
-                     (or (bound-and-true-p byte-compile-current-file)
-                         load-file-name
-                         (buffer-file-name)))))
+                     (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