mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(grep-expand-template): Use save-match-data.
This commit is contained in:
parent
820f5fec97
commit
d0afff349e
1 changed files with 7 additions and 2 deletions
|
|
@ -581,8 +581,13 @@ substitution string. Note dynamic scoping of variables.")
|
|||
(case-fold-search nil))
|
||||
(dolist (kw grep-expand-keywords command)
|
||||
(if (string-match (car kw) command)
|
||||
(setq command (replace-match (or (eval (cdr kw)) "")
|
||||
t t command))))))
|
||||
(setq command
|
||||
(replace-match
|
||||
(or (if (symbolp (cdr kw))
|
||||
(eval (cdr kw))
|
||||
(save-match-data (eval (cdr kw))))
|
||||
"")
|
||||
t t command))))))
|
||||
|
||||
(defun grep-read-regexp ()
|
||||
"Read regexp arg for interactive grep."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue