helpful

a fork of Wilfred's helpful
git clone https://git.trogloxene.org/helpful.git
Log | Files | Refs | README

commit 87a1c3c540a391dde57542a885df055ec076135c
parent 75c1df1210f97c0774e02c099d6b20c773c0147d
Author: Wilfred Hughes <me@wilfred.me.uk>
Date:   Sun,  4 Jun 2017 11:33:38 +0100

Don't call helpful--reference-positions on primitive functions

Diffstat:
Mhelpful.el | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/helpful.el b/helpful.el @@ -235,10 +235,8 @@ If the source code cannot be found, return the sexp used." (-when-let ((buf . pos) (helpful--definition sym)) pos)) -(cl-defun helpful--reference-positions (sym buf) +(defun helpful--reference-positions (sym buf) "Return all the buffer positions of references to SYM in BUF." - (when (helpful--primitive-p sym) - (cl-return-from helpful--reference-positions nil)) (-let* ((forms-and-bufs (elisp-refs--search-1 (list buf) @@ -350,7 +348,9 @@ state of the current symbol." (when source-path (let* ((buf (elisp-refs--contents-buffer source-path)) (positions - (helpful--reference-positions helpful--sym buf))) + (if (helpful--primitive-p helpful--sym) + nil + (helpful--reference-positions helpful--sym buf)))) (setq references (--map (helpful--position-head buf it) positions)) (kill-buffer buf)))