aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Tromey1995-04-08 19:52:50 +0000
committerTom Tromey1995-04-08 19:52:50 +0000
commit50776640f7a1e3228f3ecf34c88ccea657febbad (patch)
tree6b379259bf98c2a33eb6cd062451959ae32cc460
parent04ea572f64fd97427f967a5ea0e4bfcc6957ef1b (diff)
downloademacs-50776640f7a1e3228f3ecf34c88ccea657febbad.tar.gz
emacs-50776640f7a1e3228f3ecf34c88ccea657febbad.zip
(tcl-outline-level): New function
(tcl-mode): Added outline-handling stuff. From Jesper Pedersen <blackie@imada.ou.dk>
-rw-r--r--lisp/progmodes/tcl.el20
1 files changed, 17 insertions, 3 deletions
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 30bd22d05ee..08a159ee256 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.26 $ 9;; Version: $Revision: 1.27 $
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: 1994/09/01 18:06:24 $|$Revision: 1.26 $|~/modes/tcl.el.Z| 54;; $Date: 1994/10/11 02:01:27 $|$Revision: 1.27 $|~/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,9 @@
65 65
66;; Change log: 66;; Change log:
67;; $Log: tcl.el,v $ 67;; $Log: tcl.el,v $
68;; Revision 1.27 1994/10/11 02:01:27 tromey
69;; (tcl-mode): imenu-create-index-function made buffer local.
70;;
68;; Revision 1.26 1994/09/01 18:06:24 tromey 71;; Revision 1.26 1994/09/01 18:06:24 tromey
69;; Added filename completion in inferior tcl mode 72;; Added filename completion in inferior tcl mode
70;; 73;;
@@ -206,6 +209,7 @@
206;; warsaw@nlm.nih.gov (Barry A. Warsaw) 209;; warsaw@nlm.nih.gov (Barry A. Warsaw)
207;; Carl Witty <cwitty@ai.mit.edu> 210;; Carl Witty <cwitty@ai.mit.edu>
208;; T. V. Raman <raman@crl.dec.com> 211;; T. V. Raman <raman@crl.dec.com>
212;; Jesper Pedersen <blackie@imada.ou.dk>
209 213
210;; KNOWN BUGS: 214;; KNOWN BUGS:
211;; * indent-region should skip blank lines. (It does in v19, so I'm 215;; * indent-region should skip blank lines. (It does in v19, so I'm
@@ -279,7 +283,7 @@
279 (require 'imenu)) 283 (require 'imenu))
280 ())) 284 ()))
281 285
282(defconst tcl-version "$Revision: 1.26 $") 286(defconst tcl-version "$Revision: 1.27 $")
283(defconst tcl-maintainer "Tom Tromey <tromey@busco.lanl.gov>") 287(defconst tcl-maintainer "Tom Tromey <tromey@busco.lanl.gov>")
284 288
285;; 289;;
@@ -877,6 +881,11 @@ Commands:
877 (make-local-variable 'comment-end) 881 (make-local-variable 'comment-end)
878 (setq comment-end "") 882 (setq comment-end "")
879 883
884 (make-local-variable 'outline-regexp)
885 (setq outline-regexp "[^\n\^M]")
886 (make-local-variable 'outline-level)
887 (setq outline-level 'tcl-outline-level)
888
880 (make-local-variable 'font-lock-keywords) 889 (make-local-variable 'font-lock-keywords)
881 (setq font-lock-keywords tcl-font-lock-keywords) 890 (setq font-lock-keywords tcl-font-lock-keywords)
882 891
@@ -1332,6 +1341,11 @@ Returns nil if line starts inside a string, t if in a comment."
1332 (buffer-substring (match-beginning 2) 1341 (buffer-substring (match-beginning 2)
1333 (match-end 2))))) 1342 (match-end 2)))))
1334 1343
1344(defun tcl-outline-level ()
1345 (save-excursion
1346 (skip-chars-forward " \t")
1347 (current-column)))
1348
1335 1349
1336 1350
1337;; 1351;;