[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99429: * progmodes/grep.el (zrgrep):
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99429: * progmodes/grep.el (zrgrep): Call `grep-compute-defaults' at the |
Date: |
Sun, 31 Jan 2010 23:47:47 +0200 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 99429
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Sun 2010-01-31 23:47:47 +0200
message:
* progmodes/grep.el (zrgrep): Call `grep-compute-defaults' at the
beginning of interactive spec like all other grep commands do.
Put "all" in front of "gz". (Bug#5260)
modified:
lisp/ChangeLog
lisp/progmodes/grep.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-01-30 04:22:37 +0000
+++ b/lisp/ChangeLog 2010-01-31 21:47:47 +0000
@@ -1,3 +1,9 @@
+2010-01-31 Juri Linkov <address@hidden>
+
+ * progmodes/grep.el (zrgrep): Call `grep-compute-defaults' at the
+ beginning of interactive spec like all other grep commands do.
+ Put "all" in front of "gz". (Bug#5260)
+
2010-01-29 Dan Nicolaescu <address@hidden>
* vc-bzr.el (vc-bzr-after-dir-status): Match another renaming indicator.
=== modified file 'lisp/progmodes/grep.el'
--- a/lisp/progmodes/grep.el 2010-01-13 08:35:10 +0000
+++ b/lisp/progmodes/grep.el 2010-01-31 21:47:47 +0000
@@ -996,26 +996,34 @@
Like `rgrep' but uses `zgrep' for `grep-program', sets the default
file name to `*.gz', and sets `grep-highlight-matches' to `always'."
(interactive
- (let ((grep-program "zgrep")
- (grep-find-template nil) ; output of `grep-compute-defaults'
- (grep-find-command nil)
- (grep-host-defaults-alist nil)
- (grep-files-aliases '(("*.gz" . "*.gz") ; for `grep-read-files'
- ("all" . "* .*"))))
- ;; Recompute defaults using let-bound values above.
+ (progn
+ ;; Compute standard default values.
(grep-compute-defaults)
- (cond
- ((and grep-find-command (equal current-prefix-arg '(16)))
- (list (read-from-minibuffer "Run: " grep-find-command
- nil nil 'grep-find-history)))
- ((not grep-find-template)
- (error "grep.el: No `grep-find-template' available"))
- (t (let* ((regexp (grep-read-regexp))
- (files (grep-read-files regexp))
- (dir (read-directory-name "Base directory: "
- nil default-directory t))
- (confirm (equal current-prefix-arg '(4))))
- (list regexp files dir confirm grep-find-template))))))
+ ;; Compute the default zrgrep command by running `grep-compute-defaults'
+ ;; for grep program "zgrep", but not changing global values.
+ (let ((grep-program "zgrep")
+ ;; Don't change global values for variables computed
+ ;; by `grep-compute-defaults'.
+ (grep-find-template nil)
+ (grep-find-command nil)
+ (grep-host-defaults-alist nil)
+ ;; Use for `grep-read-files'
+ (grep-files-aliases '(("all" . "* .*")
+ ("gz" . "*.gz"))))
+ ;; Recompute defaults using let-bound values above.
+ (grep-compute-defaults)
+ (cond
+ ((and grep-find-command (equal current-prefix-arg '(16)))
+ (list (read-from-minibuffer "Run: " grep-find-command
+ nil nil 'grep-find-history)))
+ ((not grep-find-template)
+ (error "grep.el: No `grep-find-template' available"))
+ (t (let* ((regexp (grep-read-regexp))
+ (files (grep-read-files regexp))
+ (dir (read-directory-name "Base directory: "
+ nil default-directory t))
+ (confirm (equal current-prefix-arg '(4))))
+ (list regexp files dir confirm grep-find-template)))))))
;; Set `grep-highlight-matches' to `always'
;; since `zgrep' puts filters in the grep output.
(let ((grep-highlight-matches 'always))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99429: * progmodes/grep.el (zrgrep): Call `grep-compute-defaults' at the,
Juri Linkov <=