diff options
| author | Tom Tromey | 1995-08-22 17:49:45 +0000 |
|---|---|---|
| committer | Tom Tromey | 1995-08-22 17:49:45 +0000 |
| commit | 8967cd6efdc50a046633c99ea12536786f09dffe (patch) | |
| tree | d4c0b7b9097d43ee953da536b9d88fa368e9566e | |
| parent | 07d1e73a74af58d199a89e57d6094c80dca4f799 (diff) | |
| download | emacs-8967cd6efdc50a046633c99ea12536786f09dffe.tar.gz emacs-8967cd6efdc50a046633c99ea12536786f09dffe.zip | |
(tcl-hilit): New function from "Chris Alfeld" <calfeld@math.utah.edu>
(tcl-mode): Call it
| -rw-r--r-- | lisp/progmodes/tcl.el | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index abf2f7cbd6d..b0416ad8eee 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | ;; Author: Tom Tromey <tromey@busco.lanl.gov> | 6 | ;; Author: Tom Tromey <tromey@busco.lanl.gov> |
| 7 | ;; Chris Lindblad <cjl@lcs.mit.edu> | 7 | ;; Chris Lindblad <cjl@lcs.mit.edu> |
| 8 | ;; Keywords: languages tcl modes | 8 | ;; Keywords: languages tcl modes |
| 9 | ;; Version: $Revision: 1.45 $ | 9 | ;; Version: $Revision: 1.46 $ |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | 12 | ||
| @@ -51,7 +51,7 @@ | |||
| 51 | ;; LCD Archive Entry: | 51 | ;; LCD Archive Entry: |
| 52 | ;; tcl|Tom Tromey|tromey@busco.lanl.gov| | 52 | ;; tcl|Tom Tromey|tromey@busco.lanl.gov| |
| 53 | ;; Major mode for editing Tcl| | 53 | ;; Major mode for editing Tcl| |
| 54 | ;; $Date: 1995/07/23 23:51:25 $|$Revision: 1.45 $|~/modes/tcl.el.Z| | 54 | ;; $Date: 1995/08/07 16:02:01 $|$Revision: 1.46 $|~/modes/tcl.el.Z| |
| 55 | 55 | ||
| 56 | ;; CUSTOMIZATION NOTES: | 56 | ;; CUSTOMIZATION NOTES: |
| 57 | ;; * tcl-proc-list can be used to customize a list of things that | 57 | ;; * tcl-proc-list can be used to customize a list of things that |
| @@ -65,6 +65,10 @@ | |||
| 65 | 65 | ||
| 66 | ;; Change log: | 66 | ;; Change log: |
| 67 | ;; $Log: tcl.el,v $ | 67 | ;; $Log: tcl.el,v $ |
| 68 | ;; Revision 1.46 1995/08/07 16:02:01 tromey | ||
| 69 | ;; (tcl-do-auto-fill): Only fill past fill-column; for 19.29. | ||
| 70 | ;; (tcl-auto-fill-mode): Use force-mode-line-update. | ||
| 71 | ;; | ||
| 68 | ;; Revision 1.45 1995/07/23 23:51:25 tromey | 72 | ;; Revision 1.45 1995/07/23 23:51:25 tromey |
| 69 | ;; (tcl-word-no-props): New function. | 73 | ;; (tcl-word-no-props): New function. |
| 70 | ;; (tcl-figure-type): Use it. | 74 | ;; (tcl-figure-type): Use it. |
| @@ -278,6 +282,7 @@ | |||
| 278 | ;; T. V. Raman <raman@crl.dec.com> | 282 | ;; T. V. Raman <raman@crl.dec.com> |
| 279 | ;; Jesper Pedersen <blackie@imada.ou.dk> | 283 | ;; Jesper Pedersen <blackie@imada.ou.dk> |
| 280 | ;; dfarmer@evolving.com (Doug Farmer) | 284 | ;; dfarmer@evolving.com (Doug Farmer) |
| 285 | ;; "Chris Alfeld" <calfeld@math.utah.edu> | ||
| 281 | 286 | ||
| 282 | ;; KNOWN BUGS: | 287 | ;; KNOWN BUGS: |
| 283 | ;; * indent-region should skip blank lines. (It does in v19, so I'm | 288 | ;; * indent-region should skip blank lines. (It does in v19, so I'm |
| @@ -350,7 +355,7 @@ | |||
| 350 | (require 'imenu)) | 355 | (require 'imenu)) |
| 351 | ())) | 356 | ())) |
| 352 | 357 | ||
| 353 | (defconst tcl-version "$Revision: 1.45 $") | 358 | (defconst tcl-version "$Revision: 1.46 $") |
| 354 | (defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>") | 359 | (defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>") |
| 355 | 360 | ||
| 356 | ;; | 361 | ;; |
| @@ -1012,6 +1017,10 @@ Commands: | |||
| 1012 | (setq mode-popup-menu | 1017 | (setq mode-popup-menu |
| 1013 | (cons (concat mode-name " Mode Commands") tcl-xemacs-menu))) | 1018 | (cons (concat mode-name " Mode Commands") tcl-xemacs-menu))) |
| 1014 | 1019 | ||
| 1020 | ;; If hilit19 is loaded, add our stuff. | ||
| 1021 | (if (featurep 'hilit19) | ||
| 1022 | (tcl-hilit)) | ||
| 1023 | |||
| 1015 | (run-hooks 'tcl-mode-hook)) | 1024 | (run-hooks 'tcl-mode-hook)) |
| 1016 | 1025 | ||
| 1017 | 1026 | ||
| @@ -1964,6 +1973,20 @@ Prefix argument means switch to the Tcl buffer afterwards." | |||
| 1964 | nil)) | 1973 | nil)) |
| 1965 | (force-mode-line-update))) | 1974 | (force-mode-line-update))) |
| 1966 | 1975 | ||
| 1976 | ;; hilit19 support from "Chris Alfeld" <calfeld@math.utah.edu> | ||
| 1977 | (defun tcl-hilit () | ||
| 1978 | (hilit-set-mode-patterns | ||
| 1979 | '(tcl-mode) | ||
| 1980 | '( | ||
| 1981 | ("\\(^ *\\|\; *\\)#.*$" nil comment) | ||
| 1982 | ("[^\\]\\(\\$[A-Za-z0-9\\-\\_./\\(\\)]+\\)" 1 label) | ||
| 1983 | ("[^_]\\<\\(append\\|array\\|auto_execok\\|auto_load\\|auto_mkindex\\|auto_reset\\|break\\|case\\|catch\\|cd\\|close\\|concat\\|continue\\|eof\\|error\\|eval\\|exec\\|exit\\|expr\\|file\\|flush\\|for\\|foreach\\|format\\|gets\\|glob\\|global\\|history\\|if\\|incr\\|info\\|join\\|lappend\\|lindex\\|linsert\\|list\\|llength\\|lrange\\|lreplace\\|lsearch\\|lsort\\|open\\|pid\\|proc\\|puts\\|pwd\\|read\\|regexp\\|regsub\\|rename\\|return\\|scan\\|seek\\|set\\|source\\|split\\|string\\|switch\\|tell\\|time\\|trace\\|unknown\\|unset\\|uplevel\\|upvar\\|while\\)\\>[^_]" 1 keyword) ; tcl keywords | ||
| 1984 | ("[^_]\\<\\(after\\|bell\\|bind\\|bindtags\\|clipboard\\|destroy\\|fileevent\\|focus\\|grab\\|image\\|lower\\|option\\|pack\\|place\\|raise\\|scale\\|selection\\|send\\|subst\\|tk\\|tk_popup\\|tkwait\\|update\\|winfo\\|wm\\)\\>[^_]" 1 define) ; tk keywords | ||
| 1985 | ("[^_]\\<\\(button\\|canvas\\|checkbutton\\|entry\\|frame\\|label\\|listbox\\|menu\\|menubutton\\|message\\|radiobutton\\|scrollbar\\|text\\|toplevel\\)\\>[^_]" 1 decl) ; tk widgets | ||
| 1986 | ("[^_]\\<\\(tix\\((ButtonBox\\|Baloon\\|Control\\|DirList\\|ExFileSelectBox\\|ExFileSelectDialog\\|FileEntry\\|HList\\|LabelEntry\\|LabelFrame\\|NoteBook\\|OptionMenu\\|PanedWindow\\|PopupMenu\\|ScrolledHList\\|ScrolledText\\|ScrolledWindow\\|Select\\|StdButtonBox\\)\\)\\>[^_]" 1 defun) ; tix widgets | ||
| 1987 | ("[{}\\\"\\(\\)]" nil include) ; misc punctuation | ||
| 1988 | ))) | ||
| 1989 | |||
| 1967 | (defun tcl-electric-hash (&optional count) | 1990 | (defun tcl-electric-hash (&optional count) |
| 1968 | "Insert a `#' and quote if it does not start a real comment. | 1991 | "Insert a `#' and quote if it does not start a real comment. |
| 1969 | Prefix arg is number of `#'s to insert. | 1992 | Prefix arg is number of `#'s to insert. |