[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Jumping between highlighted regexps
From: |
Drew Adams |
Subject: |
RE: Jumping between highlighted regexps |
Date: |
Sat, 17 Mar 2007 13:32:08 -0700 |
> I would like to know if there is a way to jump between regexps that
> are highlighted using 'M-x highlight-regexp'
You can do this with library highlight.el, if you use Emacs 21 or later. I
bind `S-C-n' and `S-C-p' to highlight-next-highlight and
highlight-previous-highlight.
The navigation is per-face; that is, it is among the highlights of a given
face. Use M-x highlight-face to switch to a different face. You can
highlight in any number of faces.
You can highlight the same portions of text using multiple faces. Navigation
always reflects the current highlighting face. If that face is present, then
navigation will find it, even if the same text has additional highlighting
faces.
If the region is active and non-empty, then navigation is restricted to the
region.
To use this feature, you must use library highlight.el, not library
hi-lock.el, to create the highlights, and you must create them using
overlays, not text properties - that is, `highlight-use-overlays-flag' must
be non-nil (which it is, by default).
Code: http://www.emacswiki.org/cgi-bin/wiki/highlight.el.
Description: http://www.emacswiki.org/cgi-bin/wiki/HighLight. See also
http://www.emacswiki.org/cgi-bin/wiki/HighlightTemporarily.