You can use these libraries to highlight text in a buffer:

* [[HighlightLibrary|Highlight]] library -- highlight and unhighlight the region or regular expressions 
* HiLock -- highlight phrases or regular expressions
* [[Icicles]] -- highlight regexps: `##C-.##' during [[Icicles - Search Commands, Overview|Icicles search]] toggles leaving [[Icicles - Customization and General Tips#icicle-search-cleanup-flag|search highlighting]] on. Highlight multiple-regexp matches in multiple buffers, files,...
* MarkerPens -- highlight and unhighlight the region
* OnScreen -- Highlight the last visible screenful when scrolling



== Comparison ==

* Library ''%%HiLock%%'' is part of GnuEmacs (starting with version 21).  Libraries ''Highlight'' and ''%%MarkerPens%%'' are not.
* Libraries ''Highlight'' and ''%%HiLock%%'', and ''Icicles search'' can highlight a [[regexp]] (or remove highlighting) throughout a [[buffer]].
* Libraries ''Highlight'' and ''%%MarkerPens%%'' can highlight (or unhighlight) the [[region]].
* Library ''Highlight'' and ''Icicles search'' can highlight a [[regexp]] throughout the [[region]].
* Library ''Highlight'' can apply a [[face]] as property `mouse-face', instead of as property `face'. (A mouse face becomes visible only when the [[pointer]] is over it.)
* ''%%HiLock%%'' uses [[text property|text properties]], ''%%MarkerPens%%'' and ''Icicles search'' use [[overlay]]s, and library ''Highlight'' can use either one (option '''`highlight-use-overlays-flag''''). When overlays are used, copying and pasting buffer text will not also paste the highlighting.  When text properties are used, you can ''save'' your highlighting permanently, using enriched mode (see [[HighLight#PermanentHighlighting| Permanent Highlighting]] and [[Manual:Requesting Formatted Text]]).
* ''%%HiLock%%'' uses font-lock mode: its highlighting is visible only when `font-lock-mode' is turned on. Libraries ''Highlight'' and ''%%MarkerPens%%'', and ''Icicles search'' are independent of font-lock mode.
* Library ''Highlight'' can replace highlighting in a given face by another face, throughout the region or buffer.
* Library ''Highlight'' can unhighlight a given highlighting face (only), throughout the region or buffer.
* Libraries ''Highlight'' and ''%%MarkerPens%%'' let you use the mouse as a highlighter (marker pen). Library ''Highlight'' shows the highlighting as you drag the mouse. For ''%%MarkerPens%%'', you must first define the region (possibly by dragging).
* Libraries ''Highlight'' and ''%%MarkerPens%%'' let you combine faces.  That is, you can apply more than one highlighting face to the same text.
* You can use any number of faces to highlight with libraries ''Highlight'' and ''%%HiLock%%''. ''%%MarkerPens%%'' is limited to using 10 faces ("pens"), of which 6 are customizable. 
* Library ''Highlight'' lets you navigate among the highlights of a given face.
* Library ''Highlight'' lets you highlight new text as you type it, a la facemenu (see also [[Facemenu+]]).
* Library ''Highlight'' lets you hide and show text according to its faces (conditional text)
* Library ''Highlight'' and ''Icicles search'' work with Emacs 20, in addition to more recent Emacs versions. ''%%MarkerPens%%'' and ''%%HiLock%%'' work only with Emacs 21 and later.


'''See Also:'''
* CrosshairHighlighting -- highlight current line and column
* FaceMenuPlus
* HighlightCurrentColumn
* HighlightCurrentLine
* HighlightParentheses -- highlight the parentheses surrounding point
* HighlightSexp, HighlightSexps -- highlight [[sexp]]s at [[point]]
* HighlightSymbol -- highlight the current symbol throughout the buffer
* PulseRegion -- Gently blink the background color around a region of text
* TextMarker -- uses XRefMode

----
CategoryFaces
CategoryModes
CategoryRegexp
CategoryRegion
CategoryProgramming
