aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1998-06-03 14:39:19 +0000
committerKarl Heuer1998-06-03 14:39:19 +0000
commit961c963df34e7cc193774b2c7d1956df129db8c3 (patch)
tree157c084c696d7590bf7d102d84146bd18b9e9494
parent13cef08d9d28029c66622f8f2aeda2b1aa3c3a6f (diff)
downloademacs-961c963df34e7cc193774b2c7d1956df129db8c3.tar.gz
emacs-961c963df34e7cc193774b2c7d1956df129db8c3.zip
(find-function-noselect): Don't call
format twice with the error message. Quote the function name before splicing into regexp.
-rw-r--r--lisp/emacs-lisp/find-func.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 31ed83d331d..22b96ac6c51 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -115,7 +115,7 @@ defined is searched in PATH instead of `load-path' (see
115 (nth 1 def)) 115 (nth 1 def))
116 ((describe-function-find-file function)))) 116 ((describe-function-find-file function))))
117 (if (null library) 117 (if (null library)
118 (error (format "`%s' is not in `load-history'" function))) 118 (error "`%s' is not in `load-history'" function))
119 (if (string-match "\\(\\.elc?\\'\\)" library) 119 (if (string-match "\\(\\.elc?\\'\\)" library)
120 (setq library (substring library 0 (match-beginning 1)))) 120 (setq library (substring library 0 (match-beginning 1))))
121 (let* ((path (or path find-function-source-path)) 121 (let* ((path (or path find-function-source-path))
@@ -135,7 +135,8 @@ defined is searched in PATH instead of `load-path' (see
135 (set-buffer (find-file-noselect filename)) 135 (set-buffer (find-file-noselect filename))
136 (save-match-data 136 (save-match-data
137 (let (;; avoid defconst, defgroup, defvar (any others?) 137 (let (;; avoid defconst, defgroup, defvar (any others?)
138 (regexp (format "^\\s-*(def[^cgv\W]\\w+\\s-+%s\\s-" function)) 138 (regexp (format "^\\s-*(def[^cgv\W]\\w+\\s-+%s\\s-"
139 (regexp-quote (symbol-name function))))
139 (syntable (syntax-table))) 140 (syntable (syntax-table)))
140 (set-syntax-table emacs-lisp-mode-syntax-table) 141 (set-syntax-table emacs-lisp-mode-syntax-table)
141 (goto-char (point-min)) 142 (goto-char (point-min))