help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I make emacs rendering engine highlight a string of characte


From: Daniel Pittman
Subject: Re: How can I make emacs rendering engine highlight a string of characters ?
Date: Sun, 21 Oct 2007 15:59:16 +1000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux)

gnuist006@gmail.com writes:

> How can I make emacs rendering engine highlight a string of
> characters?  What are the emacs primitives to highlight, italicize,
> bold-font, or such? 

Other people have answers the "primitives" bit -- faces, etc -- but that
isn't quite the answer you needs.

> Is it correct that the text file is pure text and emacs renders it
> according to the settings of its rendering engine? 

More or less, yes.

> 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.

What you /want/ to look at is the "font-lock" stuff.  That is, more or
less, a set of regular expressions that apply faces to text.

See the function `highlight-regexp' and friends for one-shot actions,
and the various info documentation for how the "Font Lock" facility
works.

Regards,
        Daniel
-- 
Daniel Pittman <daniel@cybersource.com.au>           Phone: 03 9621 2377
Level 4, 10 Queen St, Melbourne             Web: http://www.cyber.com.au
Cybersource: Australia's Leading Linux and Open Source Solutions Company





reply via email to

[Prev in Thread] Current Thread [Next in Thread]