From 07508fb097f9aebecd1f039428af26254bc9e4a5 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 13 Apr 2023 16:18:15 +0200 Subject: [PATCH] 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. --- lisp/org-macs.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 8d7b0b034..aef05bc6e 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -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.