Function: find-function-read
find-function-read is a byte-compiled function defined in
find-func.el.gz.
Signature
(find-function-read &optional TYPE)
Documentation
Read and return an interned symbol, defaulting to the one near point.
If TYPE is nil, insist on a symbol with a function definition.
Otherwise TYPE should be defvar or defface.
If TYPE is nil, defaults using function-called-at-point,
otherwise uses variable-at-point.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/find-func.el.gz
(defun find-function-read (&optional type)
"Read and return an interned symbol, defaulting to the one near point.
If TYPE is nil, insist on a symbol with a function definition.
Otherwise TYPE should be `defvar' or `defface'.
If TYPE is nil, defaults using `function-called-at-point',
otherwise uses `variable-at-point'."
(let* ((symb1 (cond ((null type) (function-called-at-point))
((eq type 'defvar) (variable-at-point))
((eq type 'defface) (face-at-point t))
(t (variable-at-point t))))
(symb (unless (eq symb1 0) symb1))
(predicate (cdr (assq type '((nil . fboundp)
(defvar . boundp)
(defface . facep)))))
(prompt-type (cdr (assq type '((nil . "function")
(defvar . "variable")
(defface . "face")))))
(enable-recursive-minibuffers t))
(list (intern (completing-read
(format-prompt "Find %s" symb prompt-type)
obarray predicate
t nil nil (and symb (symbol-name symb)))))))