emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp c120dbc 2/4: * lisp/subr.el (subr-primitive-p): New


From: Andrea Corallo
Subject: feature/native-comp c120dbc 2/4: * lisp/subr.el (subr-primitive-p): New inline function.
Date: Fri, 24 Apr 2020 11:52:34 -0400 (EDT)

branch: feature/native-comp
commit c120dbc73a0c7f17f6dab190544c0b43f56ec206
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>

    * lisp/subr.el (subr-primitive-p): New inline function.
---
 lisp/subr.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/subr.el b/lisp/subr.el
index 0067665..1dd768c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -233,6 +233,11 @@ value of last one, or nil if there are none.
   (declare (indent 1) (debug t))
   (cons 'if (cons cond (cons nil body))))
 
+(defsubst subr-primitive-p (object)
+  "Return t if OBJECT is a built-in primitive function."
+  (and (subrp object)
+       (not (subr-native-elisp-p object))))
+
 (defsubst xor (cond1 cond2)
   "Return the boolean exclusive-or of COND1 and COND2.
 If only one of the arguments is non-nil, return it; otherwise



reply via email to

[Prev in Thread] Current Thread [Next in Thread]