Function: elisp-refs--completing-read-symbol

elisp-refs--completing-read-symbol is a byte-compiled function defined in elisp-refs.el.

Signature

(elisp-refs--completing-read-symbol PROMPT &optional FILTER)

Documentation

Read an interned symbol from the minibuffer, defaulting to the symbol at point. PROMPT is the string to prompt with.

If FILTER is given, only offer symbols where (FILTER sym) returns t.

Source Code

;; Defined in ~/.emacs.d/elpa/elisp-refs-20230920.201/elisp-refs.el
(defun elisp-refs--completing-read-symbol (prompt &optional filter)
  "Read an interned symbol from the minibuffer,
defaulting to the symbol at point. PROMPT is the string to prompt
with.

If FILTER is given, only offer symbols where (FILTER sym) returns
t."
  (let ((filter (or filter (lambda (_) t))))
    (read
     (completing-read prompt
                      (elisp-refs--filter-obarray filter)
                      nil nil nil nil
                      (-if-let (sym (thing-at-point 'symbol))
                          (when (funcall filter (read sym))
                            sym))))))