[Top][All Lists]

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

Re: syntax table entries for comments

From: Arjan Bos
Subject: Re: syntax table entries for comments
Date: Thu, 11 Sep 2003 07:48:00 +0200
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624

Stefan Monnier wrote:

<snip>code snippet</snip>

Could you please enlighten me as to why your way is better? I'm no (e)lisp
expert, but I'm doing allright with a bit of voodoo programming[1].

Advantages are:
- shorter.
- less memory used since the code that sets up the table can be discarded
  after the table is setup, whereas in your case, the function
  nrx-create-syntax-table needs to be kept around in case someone wants
  to call it.
- no temporary stage where nrx-mode-syntax-table holds a value that is
  not a syntax-table (or that is a syntax-table but that is not yet
  properly initialized): either it's there and initialized or it's not
  there at all.

Sounds good to me, thanks!


I tried the latter, but then strings within the `--' comment will undo the
comment highlighting.

I suspect you used font-lock-keywords rather than
You're right, I'll look up the docs for that then.

So I'll try to voodoo hack src/syntax.c

That would be wonderful.

Don't get your hopes up to high yet. The amount of constants in syntax.c and my lack of c knowlegde will make this hard. (Were it COBOL though... :-). I do happen to have a fairly recent CVS snapshot though, so I'll try it.


reply via email to

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