From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Syntax highlighting keywords starting with #
Date: Tue, 22 Nov 2005 14:53:42 -0500 [thread overview]
Message-ID: <8764qkfomd.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 1131103675.851947.176620@z14g2000cwz.googlegroups.com
> (defvar psc-mode-syntax-table
> (let ((psc-mode-syntax-table (make-syntax-table)))
> (modify-syntax-entry ?# "w" psc-mode-syntax-table)
> psc-mode-syntax-table)
> "Syntax table for PSC mode")
Better not do that.
Similarly, better not set font-lock-keywords (where did this idea come
from? I'd like to know so I can fix the source of the problem). Instead,
set font-lock-defaults:
(set (make-local-variable 'font-lock-defaults)
'(psc-font-lock-keywords nil nil ((?# . "w"))))
Note how it tells font-lock to (temporarily) treat # as a word component.
As for your main syntax-table, it should probably use something like "'"
rather than "w" for #.
Stefan
prev parent reply other threads:[~2005-11-22 19:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-03 12:11 Syntax highlighting keywords starting with # frodetj
2005-11-03 16:05 ` frodetj
2005-11-03 16:12 ` Stefan Monnier
2005-11-03 19:55 ` frodetj
2005-11-04 3:43 ` Ian Zimmerman
[not found] ` <mailman.13898.1131075812.20277.help-gnu-emacs@gnu.org>
2005-11-04 11:27 ` Frode
2005-11-22 19:53 ` Stefan Monnier [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8764qkfomd.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).