aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/find-func.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 754ad9fdf19..5d504586323 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -228,6 +228,14 @@ The search is done in the source for library LIBRARY."
228 (with-syntax-table emacs-lisp-mode-syntax-table 228 (with-syntax-table emacs-lisp-mode-syntax-table
229 (goto-char (point-min)) 229 (goto-char (point-min))
230 (if (or (re-search-forward regexp nil t) 230 (if (or (re-search-forward regexp nil t)
231 ;; `regexp' matches definitions using known forms like
232 ;; `defun', or `defvar'. But some functions/variables
233 ;; are defined using special macros (or functions), so
234 ;; if `regexp' can't find the definition, we look for
235 ;; something of the form "(SOMETHING <symbol> ...)".
236 ;; This fails to distinguish function definitions from
237 ;; variable declarations (or even uses thereof), but is
238 ;; a good pragmatic fallback.
231 (re-search-forward 239 (re-search-forward
232 (concat "^([^ ]+" find-function-space-re "['(]?" 240 (concat "^([^ ]+" find-function-space-re "['(]?"
233 (regexp-quote (symbol-name symbol)) 241 (regexp-quote (symbol-name symbol))