/[emacs]/emacs/lisp/emacs-lisp/find-func.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/find-func.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.34 by rost, Sun May 12 19:05:37 2002 UTC revision 1.35 by monnier, Thu May 16 20:11:23 2002 UTC
# Line 54  Line 54 
54  ;;   :prefix "find-function"  ;;   :prefix "find-function"
55    :group 'lisp)    :group 'lisp)
56    
57    (defconst find-function-space-re "\\(?:\\s-\\|\n\\|;.*\n\\)+")
58    
59  (defcustom find-function-regexp  (defcustom find-function-regexp
60    ;; Match things like (defun foo ...), (defmacro foo ...),    ;; Match things like (defun foo ...), (defmacro foo ...),
61    ;; (define-skeleton foo ...), (define-generic-mode 'foo ...),    ;; (define-skeleton foo ...), (define-generic-mode 'foo ...),
62    ;;  (define-derived-mode foo ...), (define-minor-mode foo)    ;;  (define-derived-mode foo ...), (define-minor-mode foo)
63    "^\\s-*(\\(def\\(ine-skeleton\\|ine-generic-mode\\|ine-derived-mode\\|\    (concat
64       "^\\s-*(\\(def\\(ine-skeleton\\|ine-generic-mode\\|ine-derived-mode\\|\
65  \[^cgv\W]\\w+\\*?\\)\\|define-minor-mode\  \[^cgv\W]\\w+\\*?\\)\\|define-minor-mode\
66  \\|easy-mmode-define-global-mode\\)\\(\\s-\\|\n\\)+\\('\\|\(quote \\)?\  \\|easy-mmode-define-global-mode\\)" find-function-space-re
67  %s\\(\\s-\\|$\\|\(\\|\)\\)"     "\\('\\|\(quote \\)?%s\\(\\s-\\|$\\|\(\\|\)\\)")
68    "The regexp used by `find-function' to search for a function definition.    "The regexp used by `find-function' to search for a function definition.
69  Note it must contain a `%s' at the place where `format'  Note it must contain a `%s' at the place where `format'
70  should insert the function name.  The default value avoids `defconst',  should insert the function name.  The default value avoids `defconst',
# Line 73  Please send improvements and fixes to th Line 76  Please send improvements and fixes to th
76    :version "21.1")    :version "21.1")
77    
78  (defcustom find-variable-regexp  (defcustom find-variable-regexp
79    "^\\s-*(def[^umag]\\(\\w\\|\\s_\\)+\\*?\\s-+%s\\(\\s-\\|$\\)"    (concat"^\\s-*(def[^umag]\\(\\w\\|\\s_\\)+\\*?" find-function-space-re "%s\\(\\s-\\|$\\)")
80    "The regexp used by `find-variable' to search for a variable definition.    "The regexp used by `find-variable' to search for a variable definition.
81  It should match right up to the variable name.  The default value  It should match right up to the variable name.  The default value
82  avoids `defun', `defmacro', `defalias', `defadvice', `defgroup'.  avoids `defun', `defmacro', `defalias', `defadvice', `defgroup'.
# Line 145  If VARIABLE-P is nil, `find-function-reg Line 148  If VARIABLE-P is nil, `find-function-reg
148              (goto-char (point-min))              (goto-char (point-min))
149              (if (or (re-search-forward regexp nil t)              (if (or (re-search-forward regexp nil t)
150                      (re-search-forward                      (re-search-forward
151                       (concat "^([^ ]+\\(\\s-\\|\n\\)+"                       (concat "^([^ ]+" find-function-space-re "['(]"
152                               (regexp-quote (symbol-name symbol))                               (regexp-quote (symbol-name symbol))
153                               "\\>")                               "\\>")
154                       nil t))                       nil t))

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26