branch: externals/compat commit 7462eb1c708a12fe4b80da5b4ba94ac4e843224c Author: Philip Kaludercic <phil...@posteo.net> Commit: Philip Kaludercic <phil...@posteo.net>
Fix bug in compat-insert when loading non-byte-compiled files --- compat.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compat.el b/compat.el index 982c6524c6..ed9388bf7d 100644 --- a/compat.el +++ b/compat.el @@ -59,8 +59,10 @@ (file (expand-file-name (format "compat-%s.el" version) (file-name-directory - (or (and (boundp 'byte-compile-current-file) byte-compile-current-file) - load-file-name + (or (and (boundp 'load-file-name) + load-file-name) + (and (boundp 'byte-compile-current-file) + byte-compile-current-file) buffer-file-name)))) (byte-compile-current-file file) defs)