Mercurial > emacs
comparison lisp/progmodes/tcl.el @ 7799:1eb0d0f0f71b
tcl-current-word does the right thing in inferior-tcl-mode.
author | Tom Tromey <tromey@redhat.com> |
---|---|
date | Sun, 05 Jun 1994 16:57:22 +0000 |
parents | 22449aa6d5ae |
children | 7d4674a34de3 |
comparison
equal
deleted
inserted
replaced
7798:f627fbbd4524 | 7799:1eb0d0f0f71b |
---|---|
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.18 $ | 9 ;; Version: $Revision: 1.19 $ |
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/06/03 20:39:14 $|$Revision: 1.18 $|~/modes/tcl.el.Z| | 54 ;; $Date: 1994/06/03 21:09:19 $|$Revision: 1.19 $|~/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.19 1994/06/03 21:09:19 tromey | |
69 ; Another menu fix. | |
70 ; | |
68 ; Revision 1.18 1994/06/03 20:39:14 tromey | 71 ; Revision 1.18 1994/06/03 20:39:14 tromey |
69 ; Fixed menu bug. | 72 ; Fixed menu bug. |
70 ; | 73 ; |
71 ; Revision 1.17 1994/06/03 00:47:15 tromey | 74 ; Revision 1.17 1994/06/03 00:47:15 tromey |
72 ; Fixed bug in bug-reporting code. | 75 ; Fixed bug in bug-reporting code. |
250 (if (and (string-match "19\\." emacs-version) | 253 (if (and (string-match "19\\." emacs-version) |
251 (not (string-match "Lucid" emacs-version))) | 254 (not (string-match "Lucid" emacs-version))) |
252 (require 'imenu)) | 255 (require 'imenu)) |
253 ())) | 256 ())) |
254 | 257 |
255 (defconst tcl-version "$Revision: 1.18 $") | 258 (defconst tcl-version "$Revision: 1.19 $") |
256 (defconst tcl-maintainer "Tom Tromey <tromey@busco.lanl.gov>") | 259 (defconst tcl-maintainer "Tom Tromey <tromey@busco.lanl.gov>") |
257 | 260 |
258 ;; | 261 ;; |
259 ;; User variables. | 262 ;; User variables. |
260 ;; | 263 ;; |
1625 | 1628 |
1626 (defun tcl-current-word (flag) | 1629 (defun tcl-current-word (flag) |
1627 "Return current command word, or nil. | 1630 "Return current command word, or nil. |
1628 If FLAG is nil, just uses `current-word'. | 1631 If FLAG is nil, just uses `current-word'. |
1629 Otherwise scans backward for most likely Tcl command word." | 1632 Otherwise scans backward for most likely Tcl command word." |
1630 (if (and flag (eq major-mode 'tcl-mode)) | 1633 (if (and flag |
1634 (memq major-mode '(tcl-mode inferior-tcl-mode))) | |
1631 (condition-case nil | 1635 (condition-case nil |
1632 (save-excursion | 1636 (save-excursion |
1633 ;; Look backward for first word actually in alist. | 1637 ;; Look backward for first word actually in alist. |
1634 (if (bobp) | 1638 (if (bobp) |
1635 () | 1639 () |