(find-function-search-for-symbol): Add comments.
This commit is contained in:
parent
fd4545a0c9
commit
a04e10bc37
1 changed files with 8 additions and 0 deletions
|
@ -228,6 +228,14 @@ The search is done in the source for library LIBRARY."
|
|||
(with-syntax-table emacs-lisp-mode-syntax-table
|
||||
(goto-char (point-min))
|
||||
(if (or (re-search-forward regexp nil t)
|
||||
;; `regexp' matches definitions using known forms like
|
||||
;; `defun', or `defvar'. But some functions/variables
|
||||
;; are defined using special macros (or functions), so
|
||||
;; if `regexp' can't find the definition, we look for
|
||||
;; something of the form "(SOMETHING <symbol> ...)".
|
||||
;; This fails to distinguish function definitions from
|
||||
;; variable declarations (or even uses thereof), but is
|
||||
;; a good pragmatic fallback.
|
||||
(re-search-forward
|
||||
(concat "^([^ ]+" find-function-space-re "['(]?"
|
||||
(regexp-quote (symbol-name symbol))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue