0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 17:16:28 +00:00

org-assert-version: Skip version check when Org is a part of Emacs

* lisp/org-macs.el (org--built-in-p): New constant indicating if Org
source is a part of Emacs source tree.
(org-assert-version): Skip check when Org is built-in.
This commit is contained in:
Ihor Radchenko 2023-04-13 16:18:15 +02:00
parent 6a96054f05
commit 07508fb097
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -36,6 +36,10 @@
;;; Org version verification.
(defconst org--built-in-p nil
"When non-nil, assume that Org is a part of Emacs source.
For internal use only. See Emacs bug #62762.
This variable is only supposed to be changed by Emacs build scripts.")
(defmacro org-assert-version ()
"Assert compile time and runtime version match."
;; We intentionally use a more permissive `org-release' instead of
@ -45,7 +49,7 @@
;; `org-assert-version' calls would fail using strict
;; `org-git-version' check because the generated Org version strings
;; will not match.
`(unless (equal (org-release) ,(org-release))
`(unless (or org--built-in-p (equal (org-release) ,(org-release)))
(warn "Org version mismatch. Org loading aborted.
This warning usually appears when a built-in Org version is loaded
prior to the more recent Org version.