aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-05-30 12:44:31 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2024-05-30 13:07:32 +0200
commit80dbd9bc5efee05a479663f8cfd0cc9e0a30dac5 (patch)
tree62030fe0ac26d5061f33a27c4500158f289f5e51
parentecea0d22162bc9a84dddc693c786125dec22ca87 (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.org4
-rw-r--r--compat-28.el5
-rw-r--r--compat-tests.el8
-rw-r--r--compat.texi7
4 files changed, 12 insertions, 12 deletions
diff --git a/NEWS.org b/NEWS.org
index c466a00..43796ad 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -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