diff options
author | Markus Rost <rost@math.uni-bielefeld.de> | 2002-05-06 21:12:42 +0000 |
---|---|---|
committer | Markus Rost <rost@math.uni-bielefeld.de> | 2002-05-06 21:12:42 +0000 |
commit | fe75e6d0237955a3d5bb2c23dfad6bb9c36bc17d (patch) | |
tree | 3210ab1ee8d2095eb8795a0bf873cf526ebe6c21 /lisp/emacs-lisp/find-func.el | |
parent | 21936ea51ec84f7860dd4aa8fda24798ecb75c76 (diff) | |
download | emacs-fe75e6d0237955a3d5bb2c23dfad6bb9c36bc17d.tar.gz emacs-fe75e6d0237955a3d5bb2c23dfad6bb9c36bc17d.tar.bz2 emacs-fe75e6d0237955a3d5bb2c23dfad6bb9c36bc17d.zip |
(find-function-search-for-symbol): Use with-syntax-table.
Diffstat (limited to 'lisp/emacs-lisp/find-func.el')
-rw-r--r-- | lisp/emacs-lisp/find-func.el | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 8850273b491..78dece5b47d 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -139,24 +139,20 @@ If VARIABLE-P is nil, `find-function-regexp' is used, otherwise find-variable-regexp find-function-regexp) (regexp-quote (symbol-name symbol)))) - (syn-table (syntax-table)) (case-fold-search)) - (unwind-protect - (progn - (set-syntax-table emacs-lisp-mode-syntax-table) - (goto-char (point-min)) - (if (or (re-search-forward regexp nil t) - (re-search-forward - (concat "^([^ ]+ +" - (regexp-quote (symbol-name symbol)) - "\\>") - nil t)) - (progn - (beginning-of-line) - (cons (current-buffer) (point))) - (error "Cannot find definition of `%s' in library `%s'" - symbol library))) - (set-syntax-table syn-table))))))) + (with-syntax-table emacs-lisp-mode-syntax-table + (goto-char (point-min)) + (if (or (re-search-forward regexp nil t) + (re-search-forward + (concat "^([^ ]+ +" + (regexp-quote (symbol-name symbol)) + "\\>") + nil t)) + (progn + (beginning-of-line) + (cons (current-buffer) (point))) + (error "Cannot find definition of `%s' in library `%s'" + symbol library)))))))) ;;;###autoload (defun find-function-noselect (function) |