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: More font-lock keywords for tcl.el Date: Wed, 30 Mar 2005 16:24:32 +0100 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112196787 28687 80.91.229.2 (30 Mar 2005 15:33:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2005 15:33:07 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 30 17:33:04 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DGfAI-0007L8-Np for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2005 17:31:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGfQo-0000Z4-Qz for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2005 10:48:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DGfJM-0004K8-50 for emacs-devel@gnu.org; Wed, 30 Mar 2005 10:40:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DGfJH-0004GH-7c for emacs-devel@gnu.org; Wed, 30 Mar 2005 10:40:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGfJD-00048t-Qg for emacs-devel@gnu.org; Wed, 30 Mar 2005 10:40:44 -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 1DGf3h-0002M5-Hm for emacs-devel@gnu.org; Wed, 30 Mar 2005 10:24:41 -0500 Original-Received: from cass41.ast.cam.ac.uk ([131.111.69.186]:63949) by ppsw-3.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.133]:25) with esmtp id 1DGf3Y-0003Yg-C0 (Exim 4.44) for emacs-devel@gnu.org (return-path ); Wed, 30 Mar 2005 16:24:32 +0100 Original-Received: from xserv2.ast.cam.ac.uk (IDENT:vxTQ+1wFET5gudjbBxWA7ucMJXG2gpsc@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 j2UFOWoL015745; Wed, 30 Mar 2005 16:24:32 +0100 (BST) Original-Received: from xalph3.ast.cam.ac.uk (IDENT:/dW5zZC3txGgHVCQ7dDbi0k+/Jiqhz3A@xpc14.ast.cam.ac.uk [131.111.69.34]) by xserv2.ast.cam.ac.uk (8.11.6/8.11.6) with ESMTP id j2UFOWc15911; Wed, 30 Mar 2005 16:24:32 +0100 Original-To: emacs-devel@gnu.org X-Spook: AIDS robotic cocaine Hizb-i-Islami rail gun IRA X-Ran: t/M3!3kx])\1=V-'v"GkGK8cpCE>]{WR+&e,8Q%tYa'u84|/5Ez[p4?aWc!5`Xgj]Muu}z X-Hue: light pink X-Attribution: GM Mail-Followup-To: 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:35362 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35362 OK to install this extra font-locking in lisp/progmodes/tcl.el? *** tcl.el 27 Nov 2004 00:07:14 -0000 1.80 --- tcl.el 30 Mar 2005 15:22:11 -0000 *************** *** 371,376 **** --- 373,393 ---- Default list includes some TclX keywords. Call `tcl-set-font-lock-keywords' after changing this list.") + (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") + "List of Tcl commands. Used only for highlighting. + Call `tcl-set-font-lock-keywords' after changing this list. + This list excludes those commands already found in `tcl-proc-list' and + `tcl-keyword-list'.") + (defvar tcl-font-lock-keywords nil "Keywords to highlight for Tcl. See variable `font-lock-keywords'. This variable is generally set from `tcl-proc-regexp', *************** *** 466,471 **** --- 483,509 ---- "\\(\\s-\\|$\\)") 2 'font-lock-type-face) + (list (concat "\\(\\s-\\|^\\|\\[\\)" + (regexp-opt tcl-builtin-list t) + "\\(\\s-\\|$\\|\\]\\)") + 2 'font-lock-builtin-face) + + ;; When variable names are enclosed in {} braces, any + ;; character can be used. Otherwise just letters, digits, + ;; underscores. Variable names can be prefixed with any + ;; number of "namespace::" qualifiers. A leading "::" refers + ;; to the global namespace. + '("\\${\\([^}]+\\)}" 1 font-lock-variable-name-face) + '("\\$\\(\\(?:::\\)?\\(?:[[:alnum:]_]+::\\)*[[:alnum:]_]+\\)" + 1 font-lock-variable-name-face) + '("\\(?:\\s-\\|^\\|\\[\\)set\\s-+{\\([^}]+\\)}" + 1 font-lock-variable-name-face keep) + '("\\(?:\\s-\\|^\\|\\[\\)set\\s-+\\(\\(?:::\\)?\ + \\(?:[[:alnum:]_]+::\\)*[[:alnum:]_]+\\)" + 1 font-lock-variable-name-face keep) + + '("\\\\$" 0 font-lock-warning-face) ; escaped EOL + ;; Keywords. Only recognized if surrounded by whitespace. ;; FIXME consider using "not word or symbol", not ;; "whitespace".