Commit graph

66 commits

Author SHA1 Message Date
Kim F. Storm
84d797c949 (grep-find-use-xargs): Use explicit value `exec'
to mean "use find -exec"; nil now unambiguously means auto-detect.
(grep-compute-defaults): Set grep-find-use-xargs to `exec' if not `gnu'.
Use shell-quote-argument to build grep-find-command and grep-find-template.
(rgrep): Use shell-quote-argument to properly quote arguments to find.
Reported by Tom Seddon.
2006-08-23 23:23:02 +00:00
Richard M. Stallman
13eb1bded1 (grep-default-command): Catch errors from wildcard-to-regexp. 2006-07-29 02:03:21 +00:00
Kim F. Storm
bcdf86fb51 (grep-read-files): Use car of grep-files-history or grep-files-aliases
as default if nothing else applies.
2006-07-28 23:20:21 +00:00
Kim F. Storm
7cb0d0ef5a (grep-tag-default): New function.
(grep-default-command, grep-read-regexp): Use it.
2006-07-28 23:03:18 +00:00
Kim F. Storm
ee87a9f988 (grep-find-ignored-directories): Add .svn and _darcs to list. 2006-07-19 11:19:27 +00:00
Richard M. Stallman
f911a4454a (grep-last-buffer): Doc fix. 2006-07-12 16:05:19 +00:00
Kim F. Storm
c2c04c28f3 (grep-mode-font-lock-keywords): Correct regexps
to recognize mode name containing submodes, such as Grep/lw.
2006-06-22 14:13:49 +00:00
Kim F. Storm
a34f7eb165 (grep-find): Don't check grep-find-command
before running command (breaks non-interactive usage).
2006-05-18 14:39:09 +00:00
Kim F. Storm
c0b87c3fdb (rgrep): Set default directory of *grep*
buffer if we start M-x rgrep in the *grep* buffer and choose
a different base directory.
2006-05-09 12:47:12 +00:00
Kim F. Storm
6e7c574fd8 (lgrep, rgrep): Doc fixes. 2006-05-08 10:26:30 +00:00
Kim F. Storm
c3e9438b5f (lgrep, rgrep): Use add-to-history. 2006-05-05 23:38:18 +00:00
Kim F. Storm
41a2f8bab5 (grep-expand-template): Use symbol-value instead of eval on symbols. 2006-05-02 08:50:59 +00:00
Kim F. Storm
d0afff349e (grep-expand-template): Use save-match-data. 2006-05-01 09:33:10 +00:00
Kim F. Storm
208cc91ffb (grep-read-files): Use buffer-name if no buffer-file-name.
Default to *.ext if no alias matches.
No default if no extension.
2006-04-28 23:39:02 +00:00
Kim F. Storm
0acfb7cea6 (defgroup grep): Doc fix.
(grep-auto-highlight): Remove.
(grep-template): New defcustom.
(grep-find-template): Rename from grep-tree-template.
(grep-files-aliases): Rename from grep-tree-files-aliases.
Remove "all" alias, add "l" alias.
(grep-tree-ignore-case, grep-tree-ignore-CVS-directories): Remove.
(grep-find-ignored-directories): New defcustom to replace
grep-tree-ignore-CVS-directories, to facilitate ignoring
subdirectories for multiple version control systems.
(grep-mode-map): Add Recursive grep item to GREP menu.
(grep-regexp-history, grep-files-history): New defvars.
(grep-probe): New helper function.
(grep-compute-defaults): Use it to simplify code.
Adapt to name changes.
Use `.' as base in grep-find-template rather than <D>.
(grep): Remove superfluous highlight-regexp arg.  Fix doc.
Call grep-compute-defaults unconditionally.
(grep-expand-keywords): New defconst.
(grep-expand-template): Rename from grep-expand-command-macros.
Simplify via grep-expand-keywords.  Look at case-fold-search instead
of grep-tree-ignore-case to add -i option.
Bind case-fold-search to nil while matching keywords.
(grep-tree-last-regexp, grep-tree-last-files): Remove.
(grep-read-regexp, grep-read-files): New helper functions.
(rgrep): Rename from grep-tree.	 Rework to use proper histories.
Adapt to changes in defcustoms and functions above.
(lgrep): New command, as grep, but using same interactive api as rgrep.
2006-04-28 22:22:01 +00:00
Stefan Monnier
4ffc92c2d8 * font-lock.el (font-lock-lines-before): Delete variable, subsumed by
the new extend-region feature.
(font-lock-after-change-function): Update correspondingly.
* jit-lock.el (jit-lock-after-change): Update correspondingly.
* progmodes/grep.el (font-lock-lines-before): Don't disable.
* modes.texi (Region to Fontify): Remove font-lock-lines-before.
2006-03-15 22:26:09 +00:00
Nick Roberts
d91362c9e0 Update copyright for 2006. 2006-02-10 09:00:31 +00:00
Juanma Barranquero
d70b5ac5d7 (font-lock-lines-before): Add defvar. 2005-08-30 10:55:25 +00:00
Juri Linkov
19b3905f26 (grep, grep-mode): Make buffer-local variables
compilation-process-setup-function and compilation-disable-input
in grep-mode instead of let-bindings in grep.
2005-08-25 19:09:22 +00:00
Richard M. Stallman
32993501da (grep): Bind compilation-disable-input to t. 2005-08-20 21:47:40 +00:00
Juri Linkov
cf115520b7 (grep-mode-map): Add ellipsis to "Another grep".
(grep-mode-font-lock-keywords): Don't highlight "Grep started".
Add highlighting of "interrupt", "killed", "terminated".
2005-08-14 06:52:40 +00:00
Juri Linkov
7462142dc4 (grep-regexp-alist): Use .+?' instead of [^:\n]+'.
(grep-mode-font-lock-keywords): Use `.+?' instead of `[^\n-]+'.
(grep-error-face): Set to `compilation-error' instead of
`compilation-error-face' (which is redefined to `grep-hit-face' in
grep buffers).
(grep-mode-font-lock-keywords): Remove `-text' from face
variable names.  Use `grep-error-face' instead of
`compilation-error-text-face'.
2005-08-09 21:37:34 +00:00
Juri Linkov
ba65be24d4 (grep-regexp-alist): Set 5th arg `TYPE' to
0 instead of 1 to display binary file names as info file links.
(grep-error-face): Use `compilation-error-face' instead of
`font-lock-keyword-face'.
(grep-mode-font-lock-keywords): Use `compilation-info-text-face'
and `compilation-warning-text-face' instead of `font-lock-keyword-face'.
Use `compilation-error-text-face' instead of `grep-error-face'.
2005-08-06 01:11:41 +00:00
Juri Linkov
94c713b27d (grep-mode-map): Bind TAB to `compilation-next-error'
and [backtab] to `compilation-previous-error'.
2005-08-04 01:38:42 +00:00
Juri Linkov
3595212959 (grep-regexp-alist): Replace complex regexp
matching line numbers, column numbers and their ranges with regexp
matching only line numbers.
(grep-context-face): New face variable.
(grep-mode-font-lock-keywords): Use it.
2005-08-04 01:11:17 +00:00
Nick Roberts
034babe1e1 Update copyright for release of 22.1 for progmodes directory. 2005-08-01 08:43:45 +00:00
Richard M. Stallman
69517e25dc (grep-error-face): Use font-lock-keyword-face
(grep-mode-font-lock-keywords):
Don't use compilation-...-face for messages that are not file names.
2005-07-23 22:13:54 +00:00
Juri Linkov
983203eeb6 (grep-regexp-alist)
(grep-mode-font-lock-keywords, grep-process-setup):
Use default GNU grep match color "01;31m" instead of "01;41m".
(grep-regexp-alist, grep-mode-font-lock-keywords):
Use `\\[[0-9]*m' instead of `\\[00m'.
(grep-regexp-alist): Move `\\(?:\033\\[K\\)?' from sgr_end to
sgr_start where its handling is more important.  Use the real
length of sgr_start instead of constant 8.
(grep-mode-font-lock-keywords): Don't delete `\\(?:\033\\[K\\)?'
specially.  Delete all remaining escape sequences.
(grep-process-setup): Set "GREP_COLORS" for GNU grep 2.5.1-cvs.
(grep-regexp-alist): Make hyperlink only for binary file name
instead of the whole line.
(grep-mode-map): Bind `backtab' to `compilation-previous-file'.
(grep-mode): Add autoload.
2005-07-19 14:21:23 +00:00
Lute Kamstra
3a35cf56e7 Update FSF's address. 2005-07-04 17:55:18 +00:00
Juri Linkov
f04a896909 (grep-regexp-alist): Use backreference at the
end of first regexp to limit the match to the position between
line number and source line with same separator character as used
between file name and line number.  In the second regexp limit
mouse-face area to file name and line number by adding new group
for them and referring it in HYPERLINK arg.
(grep-regexp-alist, grep-mode-font-lock-keywords): Use shy group.
(grep-mode): Set font-lock-lines-before to 0 to not refontify the
previous line where grep markers may be already removed.
2005-06-18 12:57:49 +00:00
Eli Zaretskii
09e224171a Fix file's header line. 2005-05-07 16:21:12 +00:00
Lute Kamstra
5ad24c0b2e (grep-mode-font-lock-keywords): Use the font-lock-face property to
highlight matches.
2005-04-28 09:15:40 +00:00
Kim F. Storm
bf247b6ed0 Change release version from 21.4 to 22.1 throughout.
Change development version from 21.3.50 to 22.0.50.
2005-02-09 15:50:47 +00:00
Dan Nicolaescu
e7eaabae69 (grep-regexp-alist): Match an optional ^[[K
that some versions of grep produce.
(grep-mode-font-lock-keywords): Likewise.
2005-02-08 16:22:25 +00:00
David Kastrup
3d4d788a38 * NEWS: Mention alias find-grep' for grep-find'.
* progmodes/grep.el: Add alias `find-grep' for `grep-find'.

* building.texi (Grep Searching): Mention alias `find-grep' for
`grep-find'.
2005-01-22 15:43:56 +00:00
Richard M. Stallman
52a7f9bd2a (grep-find): Copy from `grep' the condition for calling grep-compute-defaults. 2005-01-17 23:51:34 +00:00
Juri Linkov
f30c45e105 (grep-match-face): New defvar.
(grep-mode-font-lock-keywords): Use grep-match-face instead of
compilation-column-face to highlight grep matches.
2004-12-16 07:16:44 +00:00
Richard M. Stallman
bde94a7f47 (grep-regexp-alist): Don't match parens around line numbers. 2004-11-25 03:05:00 +00:00
Thien-Thi Nguyen
02b73b974f (grep-default-command): Take empty string
for tag if all other methods yield nil.  Shell-quote the tag.
2004-11-03 11:45:20 +00:00
Juri Linkov
1bcd42e2fe (grep-regexp-alist): Move match highlighting
code to `grep-mode-font-lock-keywords'.
(grep-mode-font-lock-keywords): Delete grep markers instead
of making them invisible.
2004-10-28 09:00:26 +00:00
Stefan Monnier
cbd5542a3c (grep-mode): Remove unnecessary autoload. 2004-09-09 21:42:52 +00:00
Juri Linkov
0443d8895a (grep-mode-map): Rename next-error-follow-mode' to next-error-follow-minor-mode'. 2004-09-08 20:21:57 +00:00
Thien-Thi Nguyen
de4c2de761 (grep-mode): Use normal autoload cookie. 2004-09-08 11:21:16 +00:00
Juri Linkov
a58c94a227 (grep-highlight-matches): Doc fix.
(grep-process-setup): Call `grep-compute-defaults' if
`grep-highlight-matches' is not computed.  Set env-vars only
if `grep-highlight-matches' is `t'.
2004-09-07 18:10:49 +00:00
Juri Linkov
00889cf957 (grep-highlight-matches): Change default from
`t' to `auto-detect', and type from `boolean' to `choice'.
(grep-compute-defaults): Set `grep-highlight-matches' to `t'
if grep option `--color' is available, or to `nil' otherwise.
(grep-use-null-device): Remove redundant type `boolean' (`choice'
is already defined).
2004-09-07 03:56:35 +00:00
Eli Zaretskii
c5d9b0ff37 (grep-mode-map): Bind toggle-next-error-follow-mode. 2004-09-04 12:48:19 +00:00
Juri Linkov
277df08871 (grep-highlight-matches): New defcustom.
(grep-regexp-alist): Add rule to highlight grep matches.
(grep-process-setup): Set env-vars GREP_OPTIONS and GREP_COLOR.
2004-09-02 16:35:42 +00:00
Richard M. Stallman
8a9cad92b1 (grep-default-command): Use find-tag-default.
(grep-tag-default): Function deleted.
2004-08-28 15:31:20 +00:00
Luc Teirlinck
c426452f4c (grep): Doc fix. 2004-07-14 22:25:09 +00:00
Eli Zaretskii
9b19858ed7 (grep-compute-defaults, grep-command)
(grep-program, find-program, grep-find-use-xargs, grep-history)
(grep-find-history, grep-tag-default, grep-find-command)
(grep-regexp-alist, grep-process-setup, grep-compute-defaults):
Add autoload cookies, for unbundled packages that load `compile'
and expect all grep-related symbols to become defined.
2004-07-03 10:06:42 +00:00