comparison lisp/progmodes/tcl.el @ 8580:648f78c8ecf5

Fixed bug in tcl-guess-application.
author Tom Tromey <tromey@redhat.com>
date Sun, 21 Aug 1994 20:33:05 +0000
parents 2d50d249caf4
children e7daed44da21
comparison
equal deleted inserted replaced
8579:c93c9e087810 8580:648f78c8ecf5
4 4
5 ;; Maintainer: Tom Tromey <tromey@busco.lanl.gov> 5 ;; Maintainer: Tom Tromey <tromey@busco.lanl.gov>
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.22 $ 9 ;; Version: $Revision: 1.23 $
10 10
11 ;; This file is part of GNU Emacs. 11 ;; This file is part of GNU Emacs.
12 12
13 ;; GNU Emacs is free software; you can redistribute it and/or modify 13 ;; GNU Emacs is free software; you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by 14 ;; it under the terms of the GNU General Public License as published by
49 ;;; Commentary: 49 ;;; Commentary:
50 50
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/07/26 00:46:07 $|$Revision: 1.22 $|~/modes/tcl.el.Z| 54 ;; $Date: 1994/08/21 03:54:45 $|$Revision: 1.23 $|~/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
58 ;; "define" other things. Eg in my project I put "defvar" in this 58 ;; "define" other things. Eg in my project I put "defvar" in this
59 ;; list. 59 ;; list.
63 ;; * tcl-type-alist can be used to minimally customize indentation 63 ;; * tcl-type-alist can be used to minimally customize indentation
64 ;; according to context. 64 ;; according to context.
65 65
66 ;; Change log: 66 ;; Change log:
67 ;; $Log: tcl.el,v $ 67 ;; $Log: tcl.el,v $
68 ;; Revision 1.23 1994/08/21 03:54:45 tromey
69 ;; Keybindings don't overshadown comint bindings.
70 ;;
68 ;; Revision 1.22 1994/07/26 00:46:07 tromey 71 ;; Revision 1.22 1994/07/26 00:46:07 tromey
69 ;; Emacs 18 changes from Carl Witty. 72 ;; Emacs 18 changes from Carl Witty.
70 ;; 73 ;;
71 ;; Revision 1.21 1994/07/14 22:49:21 tromey 74 ;; Revision 1.21 1994/07/14 22:49:21 tromey
72 ;; Added ";;;###autoload" comments where appropriate. 75 ;; Added ";;;###autoload" comments where appropriate.
191 ;; h9118101@hkuxa.hku.hk (Yip Chi Lap [Beta]) 194 ;; h9118101@hkuxa.hku.hk (Yip Chi Lap [Beta])
192 ;; Pertti Tapio Kasanen <ptk@delta.hut.fi> 195 ;; Pertti Tapio Kasanen <ptk@delta.hut.fi>
193 ;; schmid@fb3-s7.math.TU-Berlin.DE (Gregor Schmid) 196 ;; schmid@fb3-s7.math.TU-Berlin.DE (Gregor Schmid)
194 ;; warsaw@nlm.nih.gov (Barry A. Warsaw) 197 ;; warsaw@nlm.nih.gov (Barry A. Warsaw)
195 ;; Carl Witty <cwitty@ai.mit.edu> 198 ;; Carl Witty <cwitty@ai.mit.edu>
199 ;; T. V. Raman <raman@crl.dec.com>
196 200
197 ;; KNOWN BUGS: 201 ;; KNOWN BUGS:
198 ;; * indent-region should skip blank lines. (It does in v19, so I'm 202 ;; * indent-region should skip blank lines. (It does in v19, so I'm
199 ;; not motivated to fix it here). 203 ;; not motivated to fix it here).
200 ;; * In Tcl "#" is not always a comment character. This can confuse 204 ;; * In Tcl "#" is not always a comment character. This can confuse
264 (if (and (string-match "19\\." emacs-version) 268 (if (and (string-match "19\\." emacs-version)
265 (not (string-match "Lucid" emacs-version))) 269 (not (string-match "Lucid" emacs-version)))
266 (require 'imenu)) 270 (require 'imenu))
267 ())) 271 ()))
268 272
269 (defconst tcl-version "$Revision: 1.22 $") 273 (defconst tcl-version "$Revision: 1.23 $")
270 (defconst tcl-maintainer "Tom Tromey <tromey@busco.lanl.gov>") 274 (defconst tcl-maintainer "Tom Tromey <tromey@busco.lanl.gov>")
271 275
272 ;; 276 ;;
273 ;; User variables. 277 ;; User variables.
274 ;; 278 ;;
1907 (defun tcl-guess-application () 1911 (defun tcl-guess-application ()
1908 "Attempt to guess Tcl application by looking at first line. 1912 "Attempt to guess Tcl application by looking at first line.
1909 The first line is assumed to look like \"#!.../program ...\"." 1913 The first line is assumed to look like \"#!.../program ...\"."
1910 (save-excursion 1914 (save-excursion
1911 (goto-char (point-min)) 1915 (goto-char (point-min))
1912 (if (looking-at "#![^ \t]*/\\([^ \t/]+\\)\\([ \t]\\|$\\)") 1916 (if (looking-at "#![^ \t]*/\\([^ \t\n/]+\\)\\([ \t]\\|$\\)")
1913 (progn 1917 (progn
1914 (make-local-variable 'tcl-application) 1918 (make-local-variable 'tcl-application)
1915 (setq tcl-application (buffer-substring (match-beginning 1) 1919 (setq tcl-application (buffer-substring (match-beginning 1)
1916 (match-end 1))))))) 1920 (match-end 1)))))))
1917 1921