diff options
| author | Dave Love | 2000-10-06 18:35:24 +0000 |
|---|---|---|
| committer | Dave Love | 2000-10-06 18:35:24 +0000 |
| commit | a469e8baa83d554f8b370f24f9440b74cc858212 (patch) | |
| tree | 74d4bc7d39bdc3cce3c8ea19a27eaecfaf9cf0e9 | |
| parent | b3489c06eccc1d8c080c2196d1b8951597b493fa (diff) | |
| download | emacs-a469e8baa83d554f8b370f24f9440b74cc858212.tar.gz emacs-a469e8baa83d554f8b370f24f9440b74cc858212.zip | |
(find-function-regexp): Remove spurion.
Fix for define-minor-mode.
(function-at-point): Alias to function-called-at-point.
| -rw-r--r-- | lisp/emacs-lisp/find-func.el | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 0589b365692..c4da0ce5017 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el | |||
| @@ -72,7 +72,7 @@ Please send improvements and fixes to the maintainer." | |||
| 72 | :version "21.1") | 72 | :version "21.1") |
| 73 | 73 | ||
| 74 | (defcustom find-variable-regexp | 74 | (defcustom find-variable-regexp |
| 75 | "^\\s-*(def[^uma\W]\\w+\\*?\\s-+%s\\(\\s-\\|$\\)" | 75 | "^\\s-*(def[^uma]\\(\\w\\|\\s_\\)+\\*?\\s-+%s\\(\\s-\\|$\\)" |
| 76 | "The regexp used by `find-variable' to search for a variable definition. | 76 | "The regexp used by `find-variable' to search for a variable definition. |
| 77 | It should match right up to the variable name. The default value | 77 | It should match right up to the variable name. The default value |
| 78 | avoids `defun', `defmacro', `defalias', `defadvice'. | 78 | avoids `defun', `defmacro', `defalias', `defadvice'. |
| @@ -80,7 +80,7 @@ avoids `defun', `defmacro', `defalias', `defadvice'. | |||
| 80 | Please send improvements and fixes to the maintainer." | 80 | Please send improvements and fixes to the maintainer." |
| 81 | :type 'regexp | 81 | :type 'regexp |
| 82 | :group 'find-function | 82 | :group 'find-function |
| 83 | :version "20.3") | 83 | :version "21.1") |
| 84 | 84 | ||
| 85 | (defcustom find-function-source-path nil | 85 | (defcustom find-function-source-path nil |
| 86 | "The default list of directories where `find-function' searches. | 86 | "The default list of directories where `find-function' searches. |
| @@ -186,31 +186,7 @@ in `load-path'." | |||
| 186 | ((symbol-file function))))) | 186 | ((symbol-file function))))) |
| 187 | (find-function-search-for-symbol function nil library)))) | 187 | (find-function-search-for-symbol function nil library)))) |
| 188 | 188 | ||
| 189 | (defun function-at-point () | 189 | (defalias 'function-at-point 'function-called-at-point) |
| 190 | (or (condition-case () | ||
| 191 | (let ((stab (syntax-table))) | ||
| 192 | (unwind-protect | ||
| 193 | (save-excursion | ||
| 194 | (set-syntax-table emacs-lisp-mode-syntax-table) | ||
| 195 | (or (not (zerop (skip-syntax-backward "_w"))) | ||
| 196 | (eq (char-syntax (char-after (point))) ?w) | ||
| 197 | (eq (char-syntax (char-after (point))) ?_) | ||
| 198 | (forward-sexp -1)) | ||
| 199 | (skip-chars-forward "`'") | ||
| 200 | (let ((obj (read (current-buffer)))) | ||
| 201 | (and (symbolp obj) (fboundp obj) obj))) | ||
| 202 | (set-syntax-table stab))) | ||
| 203 | (error nil)) | ||
| 204 | (condition-case () | ||
| 205 | (save-excursion | ||
| 206 | (save-restriction | ||
| 207 | (narrow-to-region (max (point-min) (- (point) 1000)) (point-max)) | ||
| 208 | (backward-up-list 1) | ||
| 209 | (forward-char 1) | ||
| 210 | (let (obj) | ||
| 211 | (setq obj (read (current-buffer))) | ||
| 212 | (and (symbolp obj) (fboundp obj) obj)))) | ||
| 213 | (error nil)))) | ||
| 214 | 190 | ||
| 215 | (defun find-function-read (&optional variable-p) | 191 | (defun find-function-read (&optional variable-p) |
| 216 | "Read and return an interned symbol, defaulting to the one near point. | 192 | "Read and return an interned symbol, defaulting to the one near point. |