From: jester@panix.com (Jesse Sheidlower)
Subject: Re: font-lock-add-keywords frustrations
Date: 18 May 2003 21:06:03 -0400 [thread overview]
Message-ID: <ba9alr$ifj$1@panix2.panix.com> (raw)
In-Reply-To: xehe7sef36.fsf@xpc14.ast.cam.ac.uk
(posted and e-mailed to original poster)
In article <xehe7sef36.fsf@xpc14.ast.cam.ac.uk>,
Glenn Morris <gmorris+news@ast.cam.ac.uk> 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
>find
>
> 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
next prev parent reply other threads:[~2003-05-19 1:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-18 3:16 font-lock-add-keywords frustrations Jesse Sheidlower
2003-05-18 4:17 ` Stefan Monnier
2003-05-18 10:14 ` Glenn Morris
2003-05-19 1:06 ` Jesse Sheidlower [this message]
2003-05-19 2:27 ` Stefan Monnier
2003-05-22 20:29 ` Martin Stemplinger
2003-05-22 21:02 ` Stefan Monnier
2003-05-30 4:32 ` John L Fjellstad
2003-05-30 13:46 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ba9alr$ifj$1@panix2.panix.com' \
--to=jester@panix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.