diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-17 10:23:20 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-17 10:27:21 +0100 |
| commit | 8f33aaf1813bbf56cdad0701953f2bdd86ec00b3 (patch) | |
| tree | a8a634513c4d338b7dd774664c99e17acafb2586 /compat-27.el | |
| parent | 50296614bf609e4d71f431a8cc0e138c8d6dae9a (diff) | |
Add compat-guard dynamic condition
We have to make sure that no definitions are overriden at runtime, when the
compiled library is loaded in a newer or patched Emacs version.
Diffstat (limited to 'compat-27.el')
| -rw-r--r-- | compat-27.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compat-27.el b/compat-27.el index 3a67e6c..b891fb2 100644 --- a/compat-27.el +++ b/compat-27.el @@ -282,7 +282,7 @@ return nil." ;;;; Defined in simple.el -(compat-guard +(compat-guard (not (fboundp 'decoded-time-second)) (cl-defstruct (decoded-time ;; <compat-tests:decoded-time> (:constructor nil) (:copier nil) @@ -334,7 +334,7 @@ Internal use only." (setcdr image (plist-put (cdr image) property value))) value) -(compat-guard +(compat-guard t :feature image ;; HACK: image--set-property was broken with an off-by-one error on Emacs 26. ;; The bug was fixed in a4ad7bed187493c1c230f223b52c71f5c34f7c89. Therefore we @@ -522,7 +522,9 @@ January 1st being 1." ;;;; Defined in text-property-search.el -(compat-guard (cl-defstruct (prop-match) beginning end value)) ;; <compat-tests:prop-match> +(declare-function make-prop-match nil) +(compat-guard (not (fboundp 'make-prop-match)) + (cl-defstruct (prop-match) beginning end value)) ;; <compat-tests:prop-match> (compat-defun text-property-search-forward ;; <compat-tests:text-property-search-forward> (property &optional value predicate not-current) |
