aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorHugh Brown2016-02-29 16:20:05 +1100
committerLars Ingebrigtsen2016-02-29 16:20:05 +1100
commit90c36173fdcc7dbe1fa150784a4784a9c0cb7bbc (patch)
tree6a3dd4fbfcb4c0c0823406340aa915be6fd4c72a /doc
parent04289d1cd863fa8cc0c8a9b976a8e27d9a0b4dd1 (diff)
downloademacs-90c36173fdcc7dbe1fa150784a4784a9c0cb7bbc.tar.gz
emacs-90c36173fdcc7dbe1fa150784a4784a9c0cb7bbc.zip
Save buffers before running grep commands
* lisp/progmodes/grep.el (grep-ask-about-save): New variable (bug#96). (grep, lgrep, rgrep): Use it (bug#96). * doc/emacs/building.texi (Grep Searching): Document `grep-save-buffers'. * lisp/progmodes/grep.el (grep-save-buffers): Rename from `grep-ask-about-save'. (grep--save-buffers): New function. (grep, lgrep, rgrep): Use it.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/building.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 3fa89d9062d..03fa0ed83b2 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -382,6 +382,14 @@ use of this feature by setting @code{grep-highlight-matches} to
382@code{t}. When displaying a match in the source buffer, the exact 382@code{t}. When displaying a match in the source buffer, the exact
383match will be highlighted, instead of the entire source line. 383match will be highlighted, instead of the entire source line.
384 384
385 The @command{grep} commands will offer to save buffers before
386running. This is controlled by the @code{grep-save-buffers} variable.
387The possible values are either @code{nil} (don't save), @code{ask}
388(ask before saving), a function which will be used as a predicate (and
389is called with the file name as the parameter and should return
390non-nil if the buffer is to be saved), and any other non-@code{nil}
391value means that all buffers should be saved without asking.
392
385@findex grep-find 393@findex grep-find
386@findex find-grep 394@findex find-grep
387 The command @kbd{M-x grep-find} (also available as @kbd{M-x 395 The command @kbd{M-x grep-find} (also available as @kbd{M-x