Function: helpful--calculate-references

helpful--calculate-references is a natively compiled function defined in helpful.el.

Signature

(helpful--calculate-references SYM CALLABLE-P SOURCE-PATH)

Documentation

Calculate references for SYM in SOURCE-PATH.

Source Code

;; Defined in /nix/store/mvfc1hll8a1f23ivm3qmzj4bn64jr3x7-emacs-packages-deps/share/emacs/site-lisp/elpa/helpful-20250408.334/helpful.el
(defun helpful--calculate-references (sym callable-p source-path)
  "Calculate references for SYM in SOURCE-PATH."
  (when source-path
    (let* ((primitive-p (helpful--primitive-p sym callable-p))
           (buf (elisp-refs--contents-buffer source-path))
           (positions
            (if primitive-p
                nil
              (helpful--reference-positions
               helpful--sym helpful--callable-p buf)))
           (return-value (--map (helpful--outer-sexp buf it) positions)))
      (kill-buffer buf)
      return-value)))