[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 57e7792aa4 2/5: Allow for compat macros to be ev
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 57e7792aa4 2/5: Allow for compat macros to be evaluated in a file-less buffer |
Date: |
Sat, 26 Feb 2022 08:57:22 -0500 (EST) |
branch: externals/compat
commit 57e7792aa48a0139f821b978c87ebb9e792ccf44
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@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)))))