[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
It is sometimes useful to highlight the strings that match a certain regular expression. For example, you might wish to see all the references to a certain variable in a program source file, or highlight certain parts in a voluminous output of some program, or make certain cliches stand out in an article.
Use the M-x hi-lock-mode command to turn on a minor mode that allows you to specify regular expressions of the text to be highlighted. Hi-lock mode works like Font Lock (see section J.2 Font Lock mode), except that it lets you specify explicitly what parts of text to highlight. You control Hi-lock mode with these commands:
highlight-regexp
).
By using this command more than once, you can highlight various
parts of the text in different ways.
unhighlight-regexp
). You must enter
one of the regular expressions currently specified for highlighting.
(You can use completion, or choose from a menu, to enter one of them
conveniently.)
highlight-lines-matching-regexp
).
hi-lock-write-interactive-patterns
command.
These patterns will be read the next time you visit the file while Hi-lock mode is enabled, or whenever you use the M-x hi-lock-find-patterns command.
hi-lock-write-interactive-patterns
). The list of pairs is
found no matter where in the buffer it may be.
This command does nothing if the major mode is a member of the list
hi-lock-exclude-modes
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |