branch: externals/compat commit 57e7792aa48a0139f821b978c87ebb9e792ccf44 Author: Philip Kaludercic <phil...@posteo.net> Commit: Philip Kaludercic <phil...@posteo.net>
Allow for compat macros to be evaluated in a file-less buffer --- compat-macs.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compat-macs.el b/compat-macs.el index ab60e0204f..4d50745e9b 100644 --- a/compat-macs.el +++ b/compat-macs.el @@ -79,7 +79,8 @@ TYPE is used to set the symbol property `compat-type' for NAME." (buffer-file-name)))) ;; Guess the version from the file the macro is ;; being defined in. - (and (string-match + (and file + (string-match "compat-\\([[:digit:]]+\\.[[:digit:]]+\\)\\.\\(?:elc?\\)\\'" file) (match-string 1 file)))))