From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: More font-lock keywords for tcl.el Date: Wed, 30 Mar 2005 18:33:01 +0100 Message-ID: <8vsm2drqcy.fsf@xpc14.ast.cam.ac.uk> References: <87oed1f725.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112204015 22377 80.91.229.2 (30 Mar 2005 17:33:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2005 17:33:35 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 30 19:33:31 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DGh3o-0000s0-P0 for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2005 19:32:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGhKL-0001sn-R5 for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2005 12:50:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DGhJn-0001ps-FW for emacs-devel@gnu.org; Wed, 30 Mar 2005 12:49:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DGhJi-0001nu-Ox for emacs-devel@gnu.org; Wed, 30 Mar 2005 12:49:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGhJi-0001nj-Jz for emacs-devel@gnu.org; Wed, 30 Mar 2005 12:49:22 -0500 Original-Received: from [131.111.8.133] (helo=ppsw-3.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DGh3x-00083X-HE for emacs-devel@gnu.org; Wed, 30 Mar 2005 12:33:05 -0500 Original-Received: from cass41.ast.cam.ac.uk ([131.111.69.186]:38827) by ppsw-3.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.133]:25) with esmtp id 1DGh3u-0006n6-CK (Exim 4.44) (return-path ); Wed, 30 Mar 2005 18:33:02 +0100 Original-Received: from xserv2.ast.cam.ac.uk (IDENT:f9kOgUVl6z/k/p2bGcBVbD9383UeTTFg@xserv2.ast.cam.ac.uk [131.111.69.236]) by cass41.ast.cam.ac.uk (8.12.10+Sun/8.12.10) with ESMTP id j2UHX1oL019828; Wed, 30 Mar 2005 18:33:02 +0100 (BST) Original-Received: from xalph3.ast.cam.ac.uk (IDENT:MeuiR3hULN4bJDhLmgYugkWHyl4rk+a+@xpc14.ast.cam.ac.uk [131.111.69.34]) by xserv2.ast.cam.ac.uk (8.11.6/8.11.6) with ESMTP id j2UHX1c18570; Wed, 30 Mar 2005 18:33:01 +0100 Original-To: Stefan Monnier X-Spook: Nellis Range Abu Nidal SAS salt peter algorithm X-Ran: SY?{?X(i4[m%i(5/OYo9+%56=>egVa|+;='Zt.E*i3/T;Cbi|S#)W8>tU$\-eZ7!v=[kK! X-Hue: beige X-Attribution: GM Mail-Followup-To: Stefan Monnier , emacs-devel@gnu.org User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:35372 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35372 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. > 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.