Function: helpful--primitive-p
helpful--primitive-p is a byte-compiled function defined in
helpful.el.
Signature
(helpful--primitive-p SYM CALLABLE-P)
Documentation
Return t if SYM is defined in C.
Source Code
;; Defined in ~/.emacs.d/elpa/helpful-20250408.334/helpful.el
(defun helpful--primitive-p (sym callable-p)
"Return t if SYM is defined in C."
(let ((subrp (if (fboundp 'subr-primitive-p)
#'subr-primitive-p
#'subrp)))
(cond
((and callable-p (helpful--advised-p sym))
(funcall subrp (helpful--without-advice sym)))
(callable-p
(funcall subrp (indirect-function sym)))
(t
(let ((filename (find-lisp-object-file-name sym 'defvar)))
(or (eq filename 'C-source)
(and (stringp filename)
(let ((ext (file-name-extension filename)))
(or (equal ext "c")
(equal ext "rs"))))))))))