aboutsummaryrefslogtreecommitdiff
path: root/helpful.el
diff options
context:
space:
mode:
Diffstat (limited to 'helpful.el')
-rw-r--r--helpful.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/helpful.el b/helpful.el
index 37daee4..8be3865 100644
--- a/helpful.el
+++ b/helpful.el
@@ -515,7 +515,13 @@ POSITION-HEADS takes the form ((123 (defun foo)) (456 (defun bar)))."
(defun helpful--primitive-p (sym callable-p)
"Return t if SYM is defined in C."
(if callable-p
- (subrp (symbol-function sym))
+ (let ((fn sym))
+ ;; Find the function value associated with this symbol. If
+ ;; it's an alias, follow the alias chain to the function
+ ;; value.
+ (while (symbolp fn)
+ (setq fn (symbol-function fn)))
+ (subrp fn))
(let ((filename (find-lisp-object-file-name sym 'defvar)))
(or (eq filename 'C-source)
(and (stringp filename)