[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 34463680d5 6/6: Add runtime version check
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 34463680d5 6/6: Add runtime version check |
Date: |
Fri, 6 Jan 2023 04:57:33 -0500 (EST) |
branch: externals/compat
commit 34463680d51316441c54920e90e7ac010c18b50e
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add runtime version check
We must make sure that we don't load Compat in an incompatible Emacs
version.
---
NEWS.org | 2 ++
compat-macs.el | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/NEWS.org b/NEWS.org
index 66e0bd5fab..51912c1e5a 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -7,6 +7,8 @@
compatibility aliases, functions, macros and variables are installed.
- Remove deprecated, prefixed compatibility functions.
- Remove deprecated features ~compat-help~, ~compat-font-lock~ and ~compat-24~.
+- Compat will check that the Emacs version which was used to compile Compat
+ equals the Emacs version at runtime.
* Release of "Compat" Version 29.1.0.1
diff --git a/compat-macs.el b/compat-macs.el
index 4c9eda4f74..0d9a8b4f92 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.
- [elpa] externals/compat updated (8a32564247 -> 34463680d5), ELPA Syncer, 2023/01/06
- [elpa] externals/compat 0ffcc8bf3f 1/6: Set new development version 29.1.1.0-git, ELPA Syncer, 2023/01/06
- [elpa] externals/compat 34463680d5 6/6: Add runtime version check,
ELPA Syncer <=
- [elpa] externals/compat 9fe496cee1 5/6: Use basic alist-get definition in 25, ELPA Syncer, 2023/01/06
- [elpa] externals/compat 8ebc304b3f 2/6: Remove deprecated prefixed compatibility functions, ELPA Syncer, 2023/01/06
- [elpa] externals/compat cfe0394b98 4/6: Rework the macros in compat-macs, ELPA Syncer, 2023/01/06
- [elpa] externals/compat 220d1446fb 3/6: Remove deprecated features, ELPA Syncer, 2023/01/06