[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/find-func.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/find-func.el |
Date: |
Thu, 13 Apr 2006 14:31:23 +0000 |
Index: emacs/lisp/emacs-lisp/find-func.el
diff -u emacs/lisp/emacs-lisp/find-func.el:1.71
emacs/lisp/emacs-lisp/find-func.el:1.72
--- emacs/lisp/emacs-lisp/find-func.el:1.71 Mon Apr 10 22:33:51 2006
+++ emacs/lisp/emacs-lisp/find-func.el Thu Apr 13 14:31:23 2006
@@ -228,6 +228,14 @@
(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))