[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How can I make emacs rendering engine highlight a string ofcharacter
RE: How can I make emacs rendering engine highlight a string ofcharacters ?
Sat, 20 Oct 2007 10:21:56 -0700
> How can I make emacs rendering engine highlight a string of
> characters ? What are the emacs primitives to highlight, italicize,
> bold-font, or such ? Is it correct that the text file is pure text and
> emacs renders it according to the settings of its rendering engine? So
> what are the primitives of this rendering engine ? Where do we find
> other types of primitives ? These primitives are separate from the
> lisp portion and they are probably what one would call the graphics
> part of the emacs software.
> Thanks a lot to the stars who can explain.
GNU Emacs uses *faces* to highlight text. A face has various attributes such
as foreground and background color, font family, slant (e.g. italic), and
weight (e.g. bold).
There are several ways that highlighting with faces can be done. You will
want to learn about `font-lock' highlighting, `facemenu' highlighting, and
`hilock' highlighting. It's not clear from your description exactly what
Open the Emacs manual with `C-h r' (or `C-h i' if pre-Emacs 22, then choose
the Emacs manual), and use `g' to visit at least these sections: `Faces',
`Format Faces', `Font Lock', and `Highlight Interactively' (not necessarily
in that order). For example, once you are in the manual, use `g font lock
RET' (where `RET' means Enter) to visit the `Font Lock' section ("node").