Re: Highlight all lines that begin with a "*"
"Stephen J. Turnbull" <[email protected]> Tue, 17 Feb 2004 13:04:13 +0900
| Newsgroups | gmane.emacs.xemacs.general |
|---|---|
| Organization | The XEmacs Project |
| Message-ID | <[email protected]> |
>>>>> "David" == David E <David> writes:
David> I just wanted to know how I can highlight all lines that
David> begin with a "*".
Depends on what you mean by all and how permanent it needs to be. A
very transient approach is
C-u C-s ^\*.*$
In lisp you could do
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^\\*.*$" nil t)
(set-extent-face (make-extent (match-beginning 0) (match-end 0))
'highlight)))
which would be very permanent (there's no simple way to restore the
previous state). Or you could use font-lock to do it, but that might
interfere with your major mode.
--
Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.