diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-05-30 12:44:31 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-05-30 13:07:32 +0200 |
| commit | 80dbd9bc5efee05a479663f8cfd0cc9e0a30dac5 (patch) | |
| tree | 62030fe0ac26d5061f33a27c4500158f289f5e51 | |
| parent | ecea0d22162bc9a84dddc693c786125dec22ca87 (diff) | |
compat-28: Mark subr-native-elisp-p as obsolete
The function has been renamed to native-comp-function-p in Emacs 30.
| -rw-r--r-- | NEWS.org | 4 | ||||
| -rw-r--r-- | compat-28.el | 5 | ||||
| -rw-r--r-- | compat-tests.el | 8 | ||||
| -rw-r--r-- | compat.texi | 7 |
4 files changed, 12 insertions, 12 deletions
@@ -2,6 +2,10 @@ #+link: compat-gh https://github.com/emacs-compat/compat/issues/ #+options: toc:nil num:nil author:nil +* Development + +- compat-28: Mark =subr-native-elisp-p= as obsolete (renamed in Emacs 30). + * Release of "Compat" Version 29.1.4.5 - Minor optimization of ~plist-get~ and ~plist-put~. diff --git a/compat-28.el b/compat-28.el index b5730b1..12e7b48 100644 --- a/compat-28.el +++ b/compat-28.el @@ -396,7 +396,8 @@ not a list, return a one-element list containing OBJECT." ;;;; Defined in data.c -(compat-defalias subr-native-elisp-p ignore) ;; <compat-tests:subr-native-elisp-p> +;; Renamed in Emacs 30 to `native-comp-function-p'. +(compat-defalias subr-native-elisp-p ignore :obsolete t) ;; <compat-tests:obsolete-subr-native-elisp-p> ;;;; Defined in subr-x.el @@ -835,7 +836,7 @@ function will never return nil." ;;;; Defined in button.el ;; Obsolete Alias since 29 -(compat-defalias button-buttonize buttonize :obsolete t) ;; <compat-tests:button-buttonize> +(compat-defalias button-buttonize buttonize :obsolete t) ;; <compat-tests:obsolete-button-buttonize> ;;;; Defined in wid-edit.el diff --git a/compat-tests.el b/compat-tests.el index fe1c723..4354bd0 100644 --- a/compat-tests.el +++ b/compat-tests.el @@ -216,7 +216,7 @@ (should-equal 'h (get-text-property 0 'help-echo b)) (should-equal 'h (get-text-property 5 'help-echo b)))) -(ert-deftest compat-button-buttonize () +(ert-deftest compat-obsolete-button-buttonize () (let ((b (with-no-warnings (button-buttonize "button" 'c 'd)))) (should-equal b "button") (should-equal 'c (get-text-property 0 'action b)) @@ -1300,8 +1300,10 @@ (ert-deftest compat-native-comp-available-p () (should (memq (native-comp-available-p) '(nil t)))) -(ert-deftest compat-subr-native-elisp-p () - (should-not (subr-native-elisp-p (symbol-function 'identity)))) +(ert-deftest compat-obsolete-subr-native-elisp-p () + (with-no-warnings + (compat-tests--if (< emacs-major-version 30) + (should-not (subr-native-elisp-p (symbol-function 'identity)))))) (ert-deftest compat-subr-primitive-p () (should (subr-primitive-p (symbol-function 'identity))) ;function from fns.c diff --git a/compat.texi b/compat.texi index f49ecb0..468e652 100644 --- a/compat.texi +++ b/compat.texi @@ -2152,13 +2152,6 @@ native compilation is not available, this function behaves identically to @code{subrp}. @end defun -@c based on lisp/subr.el -@defun subr-native-elisp-p object -Return @code{t} if @var{object} if the object is native compiled lisp. -If native compilation is not available, this function always returns -@code{nil}. -@end defun - @c copied from lispref/compile.texi @defun native-comp-available-p This function returns non-@code{nil} if the running Emacs process has |
