commit d0ca3cf6ff3f5921e62bdc46f2827353532963f8 parent 85be52217ff5024f604a9337c2e420b8895a0f95 Author: Wilfred Hughes <me@wilfred.me.uk> Date: Thu, 28 Sep 2017 22:49:18 -0500 Use indirect-function rather than our own loop Diffstat:
| M | helpful.el | | | 8 | +------- |
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/helpful.el b/helpful.el @@ -513,13 +513,7 @@ 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 - (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)) + (subrp (indirect-function sym)) (let ((filename (find-lisp-object-file-name sym 'defvar))) (or (eq filename 'C-source) (and (stringp filename)