branch: externals/compat commit f1b451de5c2abb51441dd79f0fbe2444362f09cf Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Move test links --- compat-26.el | 4 ++-- compat-27.el | 13 +++++++------ compat-29.el | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/compat-26.el b/compat-26.el index fcb05f86dc..367b45e9c5 100644 --- a/compat-26.el +++ b/compat-26.el @@ -113,8 +113,8 @@ If you just want to check `major-mode', use `derived-mode-p'." (compat--assoc key alist testfn)))) (if x (cdr x) default))) -(compat-guard t - (gv-define-expander compat--alist-get ;; <compat-tests:alist-get-gv> +(compat-guard t ;; <compat-tests:alist-get-gv> + (gv-define-expander compat--alist-get (lambda (do key alist &optional default remove testfn) (macroexp-let2 macroexp-copyable-p k key (gv-letplace (getter setter) alist diff --git a/compat-27.el b/compat-27.el index d0b5c728ba..b0a63ec34f 100644 --- a/compat-27.el +++ b/compat-27.el @@ -349,8 +349,8 @@ There is no need to explicitly add `help-char' to CHARS; ;;;; Defined in simple.el -(compat-guard (not (fboundp 'decoded-time-second)) - (cl-defstruct (decoded-time ;; <compat-tests:decoded-time> +(compat-guard (not (fboundp 'decoded-time-second)) ;; <compat-tests:decoded-time> + (cl-defstruct (decoded-time (:constructor nil) (:copier nil) (:type list)) @@ -417,9 +417,10 @@ NOTE: The compatibility version behaves like `with-no-warnings'." ;; HACK: image--set-property was broken with an off-by-one error on Emacs 26. ;; The bug was fixed in a4ad7bed187493c1c230f223b52c71f5c34f7c89. Therefore we ;; override the gv expander until Emacs 27.1. -(compat-guard (or (= emacs-major-version 26) (not (get 'image-property 'gv-expander))) +(compat-guard ;; <compat-tests:image-property> + (or (= emacs-major-version 26) (not (get 'image-property 'gv-expander))) :feature image - (gv-define-setter image-property (value image prop) ;; <compat-tests:image-property> + (gv-define-setter image-property (value image prop) `(,(if (< emacs-major-version 26) 'image--set-property 'compat--image--set-property) ,image ,prop ,value))) @@ -620,8 +621,8 @@ January 1st being 1." ;;;; Defined in text-property-search.el (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-guard (not (fboundp 'make-prop-match)) ;; <compat-tests:prop-match> + (cl-defstruct (prop-match) beginning end value)) (compat-defun text-property-search-forward ;; <compat-tests:text-property-search-forward> (property &optional value predicate not-current) diff --git a/compat-29.el b/compat-29.el index d69f5ba6ff..a0fd48a942 100644 --- a/compat-29.el +++ b/compat-29.el @@ -125,8 +125,8 @@ Unibyte strings are converted to multibyte for comparison." ;;;; Defined in gv.el -(compat-guard t - (gv-define-expander compat--plist-get ;; <compat-tests:plist-get-gv> +(compat-guard t ;; <compat-tests:plist-get-gv> + (gv-define-expander compat--plist-get (lambda (do plist prop &optional predicate) (macroexp-let2 macroexp-copyable-p key prop (gv-letplace (getter setter) plist