Mercurial > emacs
changeset 22340:65cdb6a99775
(find-function-noselect): Don't call
format twice with the error message. Quote the function name
before splicing into regexp.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 03 Jun 1998 14:39:19 +0000 |
parents | 69de59462e22 |
children | 572ba933a4bf |
files | lisp/emacs-lisp/find-func.el |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/find-func.el Wed Jun 03 14:38:07 1998 +0000 +++ b/lisp/emacs-lisp/find-func.el Wed Jun 03 14:39:19 1998 +0000 @@ -115,7 +115,7 @@ (nth 1 def)) ((describe-function-find-file function)))) (if (null library) - (error (format "`%s' is not in `load-history'" function))) + (error "`%s' is not in `load-history'" function)) (if (string-match "\\(\\.elc?\\'\\)" library) (setq library (substring library 0 (match-beginning 1)))) (let* ((path (or path find-function-source-path)) @@ -135,7 +135,8 @@ (set-buffer (find-file-noselect filename)) (save-match-data (let (;; avoid defconst, defgroup, defvar (any others?) - (regexp (format "^\\s-*(def[^cgv\W]\\w+\\s-+%s\\s-" function)) + (regexp (format "^\\s-*(def[^cgv\W]\\w+\\s-+%s\\s-" + (regexp-quote (symbol-name function)))) (syntable (syntax-table))) (set-syntax-table emacs-lisp-mode-syntax-table) (goto-char (point-min))