[Top][All Lists]

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

Re: font-lock-add-keywords frustrations

From: Jesse Sheidlower
Subject: Re: font-lock-add-keywords frustrations
Date: 18 May 2003 21:06:03 -0400

(posted and e-mailed to original poster)

In article <address@hidden>,
Glenn Morris  <address@hidden> wrote:
>Jesse Sheidlower wrote:
>> (defface test-face
>> (font-lock-add-keywords 'psgml-mode
>>   '(("slam" . test-face)))
>Try quoting test-face:
>(font-lock-add-keywords 'psgml-mode
>  '(("slam" . 'test-face)))
>Though I do not have psgml-mode, that works for me in lisp-mode, etc.
>In the documentation of the variable `font-lock-keywords', you will
>    FACENAME is an expression whose *value* is the face name to use.
>(my emphasis). [...]

Thanks very much. This and Stefan's similar comments were helpful, and 
you're quite right that I was confused by the coincidence of the names
of the variables and the faces like `font-lock-variable-name-face'.

However--and after much further experimentation--I seem to be coming
to the conclusion that there's something about psgml that's causing 
the problem. After quoting "test-face" properly, it _still_ didn't work,
so I tried it with other font-lock-supporting modes, including lisp-mode,
c-mode, and cperl-mode, and it worked in all of them. I tried different
keywords as well, also with no problem--as soon as I typed "barfoo" or
whatever in c-mode, it highlighted in test-face as I defined above.

But in psgml-mode, it just didn't work. I looked through the psgml-mode
manual, to no avail, and though I'm working on it I still don't know
enough Emacs Lisp to make it through the source code. 

Anyone have further suggestions? Thanks very much.

Jesse Sheidlower

reply via email to

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