need a gentle introduction to font-lock-ing

need a gentle introduction to font-lock-ing

Post by phaccoun » Fri, 16 Jun 2006 21:44:32


Hello again,

I have a text file with multiple journal references. I would like to
highlight the titles of the references automatically:

Vacuum science considerations for rapid reactor recovery with
extremely low oxygen in low temperature low pressure chemical vapor
deposition of Si.1.-.xGe.x and Si.1.-.x.-.yGe.xC.y films AUTHORS-
Enicks, D.; Oleszek, G. PAGE- 467-473 NDN- 224-0999-1839-9

To get this item click on the following link:
http://www.yqcomputer.com/

I would like to write a small minor mode to implement this. I have the
"writing gnu emacs extensions" book, and know of the emacs lisp intro
info pages. But the info on font locking seems overwhelming and I am
not sure where to start.

I know that somewhere along the line, I will need a regexp to pick up
the title (between a blank line and AUTHORS kwd in this case).

If feasible, can someone give me an (understandeable) example code? Or
pointers to specific info pages.

Thanks,

Mirko
 
 
 

need a gentle introduction to font-lock-ing

Post by M Jared Fi » Tue, 20 Jun 2006 13:33:47


Have you read the documentation to font-lock-keywords? It's a bit hefty
(cause font-locking has a lot of options), but it's pretty descriptive.
Here's a quote from the documentation:


-- MJF

 
 
 

need a gentle introduction to font-lock-ing

Post by phaccoun » Sat, 24 Jun 2006 02:03:35


You are right about the hefty part :-)
That should get me going.

Thanks,

Mirko