aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxeals <dev@xeal.me>2020-05-04 22:56:36 +1000
committerxeals <dev@xeal.me>2020-05-04 23:07:21 +1000
commit3a9ada2b46264e271923b7dbcbc219f2e360bc22 (patch)
treee45ccabd6895b18683cb383ad3dcced29df539aa
parentc54e9ddbd6a77858048c1a4c4b549de98af8f88e (diff)
Check callables aren't native-compiled before calling them primitive
-rw-r--r--helpful.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/helpful.el b/helpful.el
index 20713d2..85adc5c 100644
--- a/helpful.el
+++ b/helpful.el
@@ -1633,7 +1633,9 @@ POSITION-HEADS takes the form ((123 (defun foo)) (456 (defun bar)))."
((and callable-p (helpful--advised-p sym))
(subrp (helpful--without-advice sym)))
(callable-p
- (subrp (indirect-function sym)))
+ (and (not (and (fboundp 'subr-native-elisp-p)
+ (subr-native-elisp-p (indirect-function sym))))
+ (subrp (indirect-function sym))))
(t
(let ((filename (find-lisp-object-file-name sym 'defvar)))
(or (eq filename 'C-source)