diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-06 01:20:31 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-06 10:35:53 +0100 |
| commit | 34463680d51316441c54920e90e7ac010c18b50e (patch) | |
| tree | f837aad5233c7c2921f80f440aded2e675f1353c /compat-macs.el | |
| parent | 9fe496cee177e82c983c5fa1643125da00638426 (diff) | |
Add runtime version check
We must make sure that we don't load Compat in an incompatible Emacs version.
Diffstat (limited to 'compat-macs.el')
| -rw-r--r-- | compat-macs.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compat-macs.el b/compat-macs.el index 4c9eda4..0d9a8b4 100644 --- a/compat-macs.el +++ b/compat-macs.el @@ -31,7 +31,9 @@ (defmacro compat-declare-version (version) "Set the Emacs version that is currently being handled to VERSION." (setq compat--current-version version) - nil) + `(unless (equal emacs-version ,emacs-version) + (error ,(format "Compat was compiled with Emacs %s, you are running %%s" emacs-version) + emacs-version))) (defun compat--format-docstring (type name docstring) "Format DOCSTRING for NAME of TYPE. |
