diff options
| author | Miles Bader <miles@gnu.org> | 2006-04-17 08:41:12 +0000 |
|---|---|---|
| committer | Miles Bader <miles@gnu.org> | 2006-04-17 08:41:12 +0000 |
| commit | cfc2051d0ed5a268528a647ab0911a2f5cc451de (patch) | |
| tree | cb622fe0b6c1ba8b97314fb80ba2fd8fad60a5a2 /lisp/emacs-lisp/find-func.el | |
| parent | ca49cf1703cc20d50653c32ca2f438c8819b78bd (diff) | |
| parent | e4a89ccf738861d7b9c4f611185aa0f204c9c208 (diff) | |
| download | emacs-cfc2051d0ed5a268528a647ab0911a2f5cc451de.tar.gz | |
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-56
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 204-225)
- Update from CVS
- Sync from erc--emacs--0
- Merge from gnus--rel--5.10
- Improve tq.el.
- Update from CVS: src/puresize.h (PURESIZE_RATIO): Reduce to 10/6.
* gnus--rel--5.10 (patch 81-85)
- Update from CVS
- Merge from emacs--devo--0
Diffstat (limited to 'lisp/emacs-lisp/find-func.el')
| -rw-r--r-- | lisp/emacs-lisp/find-func.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 4f961df0791..5d504586323 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -64,7 +64,7 @@ (concat "^\\s-*(\\(def\\(ine-skeleton\\|ine-generic-mode\\|ine-derived-mode\\|\ ine\\(?:-global\\)?-minor-mode\\|ine-compilation-mode\\|un-cvs-mode\\|\ -foo\\|[^cfgv]\\w+\\*?\\)\\|easy-mmode-define-[a-z-]+\\|easy-menu-define\\|\ +foo\\|[^cfgv]\\(\\w\\|\\s_\\)+\\*?\\)\\|easy-mmode-define-[a-z-]+\\|easy-menu-define\\|\ menu-bar-make-toggle\\)" find-function-space-re "\\('\\|\(quote \\)?%s\\(\\s-\\|$\\|\(\\|\)\\)") @@ -228,8 +228,16 @@ 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 "['(]" + (concat "^([^ ]+" find-function-space-re "['(]?" (regexp-quote (symbol-name symbol)) "\\_>") nil t)) |
