diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2004-11-03 11:45:20 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2004-11-03 11:45:20 +0000 |
commit | 02b73b974f58f937c09ac318fd40d32c9a157c8b (patch) | |
tree | 3cc90d7a8c44475bbb95280073cdb494011d7e8a /lisp | |
parent | 2e73435333f50845d845633664161d26d55afd51 (diff) | |
download | emacs-02b73b974f58f937c09ac318fd40d32c9a157c8b.tar.gz |
(grep-default-command): Take empty string
for tag if all other methods yield nil. Shell-quote the tag.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/progmodes/grep.el | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d47e404cf0e..a7c72f3bd68 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2004-11-03 Thien-Thi Nguyen <ttn@gnu.org> + * progmodes/grep.el (grep-default-command): Take empty string + for tag if all other methods yield nil. Shell-quote the tag. + * vc.el (vc-annotate-display-autoscale): Add prefix-arg spec in `interactive' form, and mention it in the docstring. Also, make sure point is at bol after calling `annotate-time'. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 71927642a96..7a13ddba6ed 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -436,9 +436,11 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." (defun grep-default-command () (let ((tag-default - (funcall (or find-tag-default-function - (get major-mode 'find-tag-default-function) - 'find-tag-default))) + (shell-quote-argument + (or (funcall (or find-tag-default-function + (get major-mode 'find-tag-default-function) + 'find-tag-default)) + ""))) (sh-arg-re "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' \t\n]\\)+\\)") (grep-default (or (car grep-history) grep-command))) ;; Replace the thing matching for with that around cursor. @@ -460,7 +462,7 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." 0 (match-beginning 2)) " *." (file-name-extension buffer-file-name)))) - (replace-match (or tag-default "") t t grep-default 1)))) + (replace-match tag-default t t grep-default 1)))) ;;;###autoload (defun grep (command-args &optional highlight-regexp) |