[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Grep with matching lines syntax highlighted [snippet]
From: |
Drew Adams |
Subject: |
RE: Grep with matching lines syntax highlighted [snippet] |
Date: |
Mon, 11 Dec 2006 09:35:04 -0800 |
> You can do (add-hook 'compilation-filter-hook
> 'remove-grep-comments) to _always_ strip the comment lines, if you want to
> avoid using `remove-grep-comments' (that is, `;') each time to do that.
> `remove-grep-comments' does nothing outside of grep-mode, so this
> is benign in other compilation-result buffers.
FYI - I've added a command, bound to `M-;', that toggles this automatic
removal of commented lines.
The toggle command just adds and removes `remove-grep-comments' to and from
`compilation-filter-hook'. It also runs grep again to refresh the output to
have or not have (single-line) comments, according to the toggle.
http://www.emacswiki.org/cgi-bin/wiki/grep%2b.el
(Note: This is for Emacs 22 only.)