[Top][All Lists]

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

Re: More font-lock keywords for tcl.el

From: Glenn Morris
Subject: Re: More font-lock keywords for tcl.el
Date: Wed, 30 Mar 2005 18:33:01 +0100
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Stefan Monnier wrote:

> Just skimming through it, I notice "namespace". Is it really a
> builtin? I would've expected it to be a keyword.

It's a command, if that's what you're asking. (I got this list from

>> +          (list (concat "\\(\\s-\\|^\\|\\[\\)"
>> +                   (regexp-opt tcl-builtin-list t)
>> +                   "\\(\\s-\\|$\\|\\]\\)")
> How 'bout (concat "\\_<" (regexp-opt tcl-builtin-list t) "\\_>") ?

OK. I used the format I did because it's the same as the existing
stuff in tcl.el.

>> +          '("\\\\$" 0 font-lock-warning-face) ; escaped EOL
> Why warning?  Is it dangerous?  I don't think so.

Personally, I like it to stand out (that's no argument, of course!).
I think I was trying to be consistent with sh-script.el.
There, escaped EOLs used to be highlighted in string-face. But that
confused sh-get-indent-info, so I changed it to warning-face.


> Also the regexp matched more than escaped EOL, it also matches an
> escaped backslash at the end of the line.

The regexp is also the same as the sh-script.el one.

What's a regexp for "/ at the end of a line, not preceded by an odd
number of other /"?

I tried this monstrosity:


but it also matches \\\\ (I don't see why).

I can just leave this part out, I'm not especially bothered.
But sh-script should at least be corrected, I guess.

reply via email to

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