unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Nikolaj Schumacher <me@nschum.de>
To: Xah <xahlee@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: problem understanding font-lock-defaults structure
Date: Wed, 08 Oct 2008 23:22:55 +0200	[thread overview]
Message-ID: <m2y70ykci8.fsf@nschum.de> (raw)
In-Reply-To: <ff454a65-4838-46f4-b4a5-b340b2773a5c@a3g2000prm.googlegroups.com> (Xah's message of "Wed\, 8 Oct 2008 11\:46\:33 -0700 \(PDT\)")

Xah <xahlee@gmail.com> wrote:

> 2008-01-13
??

> After i evaluate the lisp code, i expect, the Sin should be syntax
> highlighted but is not.

From the doc: "Defaults for Font Lock mode specified by the major mode."

Setting this variable only works when you define a new major mode.  To
add keywords afterwards, use `font-lock-add-keywords'

> I'm not sure how many level of list is required, or if the nesting is
> optional...

Using multiple keywords is optional, i.e. you may leave out the two nils
and one level of parentheses.  Your nesting and quoting is correct.

You might also want to use "\\<Sin\\>" instead of "Sin", etc.

regards,
Nikolaj Schumacher




  reply	other threads:[~2008-10-08 21:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08 18:46 problem understanding font-lock-defaults structure Xah
2008-10-08 21:22 ` Nikolaj Schumacher [this message]
     [not found] ` <mailman.619.1223500981.25473.help-gnu-emacs@gnu.org>
2008-10-09  0:02   ` Xah
2008-10-09  0:54     ` Lennart Borgman (gmail)
2008-10-09  2:25       ` Kevin Rodgers
     [not found]       ` <mailman.643.1223519147.25473.help-gnu-emacs@gnu.org>
2008-10-09 21:18         ` Xah
2008-10-09 11:13     ` Nikolaj Schumacher
     [not found]     ` <mailman.637.1223513718.25473.help-gnu-emacs@gnu.org>
2008-10-09 15:04       ` Xah
2008-10-09 15:26         ` harven
2008-10-09 17:17           ` Nikolaj Schumacher
     [not found]     ` <mailman.677.1223550826.25473.help-gnu-emacs@gnu.org>
2008-10-09 15:29       ` Xah
2008-10-09 17:16         ` Nikolaj Schumacher
     [not found]         ` <mailman.719.1223572620.25473.help-gnu-emacs@gnu.org>
2008-10-09 21:40           ` Xah
2008-10-09 23:27             ` Nikolaj Schumacher
     [not found]             ` <mailman.739.1223594868.25473.help-gnu-emacs@gnu.org>
2008-10-10  0:20               ` Xah
2008-10-10  0:45             ` Tim X

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=m2y70ykci8.fsf@nschum.de \
    --to=me@nschum.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=xahlee@gmail.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.
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).