emacs-devel
[Top][All Lists]
Advanced

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

Re: font-lock-face superseeds face?


From: Lennart Borgman (gmail)
Subject: Re: font-lock-face superseeds face?
Date: Sat, 16 Jun 2007 22:15:10 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070604 Thunderbird/2.0.0.4 Mnenhy/0.7.5.666

martin rudalics wrote:
 > No, I have not tried that yet. I wanted to be sure what the behaviour
 > should be first. Actually I believe it worked as I expect it to long
 > before, but I am not sure. It is however quite possible I got fooled by
 > the different cases we have seen here.

I never used the `font-lock-face' property before hence I can't tell.
The documentation tells me nothing about whether it should override
("supersede") any other face / font-lock-face.  The Elisp manual says

     ...  This can be advantageous for special buffers
     which are not intended to be user-editable, or for static areas of
     text which are always fontified in the same way. ...

and none of these apply in your case.  If you want to change the
behavior in your particular use case insert a line like

        (unless (text-property-not-all beg (point) 'font-lock-face nil)

before

          (when face (put-text-property beg (point) 'face face))

in `font-lock-fontify-syntactically-region'.

In my case I just want to avoid using overlays (it simplifies the code very much in my case).




reply via email to

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