all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <gmorris+emacs@ast.cam.ac.uk>
Cc: emacs-devel@gnu.org
Subject: Re: More font-lock keywords for tcl.el
Date: Wed, 30 Mar 2005 18:33:01 +0100	[thread overview]
Message-ID: <8vsm2drqcy.fsf@xpc14.ast.cam.ac.uk> (raw)
In-Reply-To: 87oed1f725.fsf-monnier+emacs@gnu.org

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
Some-Frighteningly-Thick-Tcl-Book.)

>> +          (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.

<http://lists.gnu.org/archive/html/emacs-pretest-bug/2003-09/msg00028.html>

> 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	other threads:[~2005-03-30 17:33 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
2005-03-30 17:33   ` Glenn Morris [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8vsm2drqcy.fsf@xpc14.ast.cam.ac.uk \
    --to=gmorris+emacs@ast.cam.ac.uk \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.