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 12:56:16 +0200 |
| commit | 492c0d1db1aa90d88db401bc20272dde905edb54 (patch) | |
| tree | f2fdc66df7b1ec4beb6803671e79d65198f52522 /compat-30.el | |
| parent | 3748c0b0c188a2e0e9c716d4e61dd62ee9bf5897 (diff) | |
compat-28: Mark subr-native-elisp-p as obsolete
The function has been renamed to native-comp-function-p in Emacs 30.
Diffstat (limited to 'compat-30.el')
| -rw-r--r-- | compat-30.el | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compat-30.el b/compat-30.el index 81b8fef..82cb242 100644 --- a/compat-30.el +++ b/compat-30.el @@ -142,6 +142,16 @@ details." ;;;; Defined in subr.el +(compat-defmacro static-if (condition then-form &rest else-forms) ;; <compat-tests:static-if> + "A conditional compilation macro. +Evaluate CONDITION at macro-expansion time. If it is non-nil, +expand the macro to THEN-FORM. Otherwise expand it to ELSE-FORMS +enclosed in a `progn' form. ELSE-FORMS may be empty." + (declare (indent 2) (debug (sexp sexp &rest sexp))) + (if (eval condition lexical-binding) + then-form + (cons 'progn else-forms))) + (compat-defun closurep (object) ;; <compat-tests:closurep> "Return t if OBJECT is a function of type closure." (declare (side-effect-free error-free)) @@ -154,7 +164,7 @@ details." This excludes special forms, since they are not functions." (declare (side-effect-free error-free)) (and (subrp object) - (not (or (subr-native-elisp-p object) + (not (or (with-no-warnings (subr-native-elisp-p object)) (special-form-p object))))) (compat-defalias drop nthcdr) ;; <compat-tests:drop> @@ -230,16 +240,6 @@ By default we choose the head of the first list." tree)) (copy-tree tree vectors-and-records))) -(compat-defmacro static-if (condition then-form &rest else-forms) ;; <compat-tests:static-if> - "A conditional compilation macro. -Evaluate CONDITION at macro-expansion time. If it is non-nil, -expand the macro to THEN-FORM. Otherwise expand it to ELSE-FORMS -enclosed in a `progn' form. ELSE-FORMS may be empty." - (declare (indent 2) (debug (sexp sexp &rest sexp))) - (if (eval condition lexical-binding) - then-form - (cons 'progn else-forms))) - ;;;; Defined in fns.c (compat-defun value< (a b) ;; <compat-tests:value<> |
