From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: More font-lock keywords for tcl.el
Date: Wed, 30 Mar 2005 11:20:11 -0500 [thread overview]
Message-ID: <87oed1f725.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <w764z9tavj.fsf@xpc14.ast.cam.ac.uk> (Glenn Morris's message of "Wed, 30 Mar 2005 16:24:32 +0100")
> OK to install this extra font-locking in lisp/progmodes/tcl.el?
Go for it. AFAIK there's no maintainer for tcl-mode and I've been the most
"active" maintainer for it in the last few years, but my last use of Tcl
goes back many years.
> + (defvar tcl-builtin-list
> + '("after" "append" "array" "bgerror" "binary" "catch" "cd" "clock"
> + "close" "concat" "console" "dde" "encoding" "eof" "exec" "expr"
> + "fblocked" "fconfigure" "fcopy" "file" "fileevent" "flush"
> + "format" "gets" "glob" "history" "incr" "info" "interp" "join"
> + "lappend" "lindex" "linsert" "list" "llength" "load" "lrange"
> + "lreplace" "lsort" "namespace" "open" "package" "pid" "puts" "pwd"
> + "read" "regexp" "registry" "regsub" "rename" "scan" "seek" "set"
> + "socket" "source" "split" "string" "subst" "tell" "time" "trace"
> + "unknown" "unset" "vwait")
Just skimming through it, I notice "namespace". Is it really a builtin?
I would've expected it to be a keyword.
> + (list (concat "\\(\\s-\\|^\\|\\[\\)"
> + (regexp-opt tcl-builtin-list t)
> + "\\(\\s-\\|$\\|\\]\\)")
How 'bout (concat "\\_<" (regexp-opt tcl-builtin-list t) "\\_>") ?
> + '("\\\\$" 0 font-lock-warning-face) ; escaped EOL
Why warning? Is it dangerous? I don't think so.
Also the regexp matched more than escaped EOL, it also matches an escaped
backslash at the end of the line.
I'd rather put a warning face on things like "\\\\[ \t]+$" (although it
should also check to see if the backslash is not escaped).
Stefan
next prev parent reply other threads:[~2005-03-30 16:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-30 15:24 More font-lock keywords for tcl.el Glenn Morris
2005-03-30 16:20 ` Stefan Monnier [this message]
2005-03-30 17:33 ` Glenn Morris
2005-03-30 22:18 ` Stefan Monnier
2005-03-31 19:32 ` Glenn Morris
2005-03-31 20:36 ` 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
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=87oed1f725.fsf-monnier+emacs@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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).