[Top][All Lists]

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

Re:can font-lock hide parts of text?

From: Daniel Pfeiffer
Subject: Re:can font-lock hide parts of text?
Date: Fri, 26 Dec 2003 10:17:40 +0100

>  [A]This is a [G]Song

> I would like to be able to make an option that shows
>  ^This is a ^Song
> where ^ is some mark (in a different color) that there there is a chord.

font-lock is the way to go!  A list starting with the symbol face allows 
setting any number of properties.  The matcher would have instead of a face name

("\\[[AG]\\]" (face default insible t))

or to display arbitrary strings

("\\[A\\]" (face my-A-face display "This hides [A]"))
("\\[G\\]" (face my-G-face display "This hides [G]"))

Untested, maybe you need ("..." (0 (face ...)))

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

lerne / learn / apprends / läramå    Esperanto:

reply via email to

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