commit 1d2a7d169151c864b9d593c0f4bdf8deb664b23d parent 4520b411650036df43750c980fb95f20871d014d Author: Wilfred Hughes <me@wilfred.me.uk> Date: Sat, 3 Jun 2017 00:08:19 +0100 Handle C functions too Diffstat:
| M | helpful.el | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/helpful.el b/helpful.el @@ -180,8 +180,10 @@ If the source code cannot be found, return the sexp used." (-when-let ((buf . pos) (helpful--definition sym)) pos)) -(defun helpful--reference-positions (sym buf) +(cl-defun helpful--reference-positions (sym buf) "Return all the buffer positions of references to SYM in BUF." + (when (subrp (symbol-function sym)) + (cl-return-from helpful--reference-positions nil)) (-let* ((forms-and-bufs (elisp-refs--search-1 (list buf)