comparison lisp/progmodes/tcl.el @ 13697:5a8356dc9ffc

(add-log-tcl-defun): Now uses tcl-beginning-of-defun.
author Tom Tromey <tromey@redhat.com>
date Thu, 07 Dec 1995 18:18:21 +0000
parents 8172973fd6e4
children a5b05f960c30
comparison
equal deleted inserted replaced
13696:f89aa5a5c485 13697:5a8356dc9ffc
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.46 $ 9 ;; Version: $Revision: 1.47 $
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: 1995/08/07 16:02:01 $|$Revision: 1.46 $|~/modes/tcl.el.Z| 54 ;; $Date: 1995/08/22 17:49:45 $|$Revision: 1.47 $|~/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.47 1995/08/22 17:49:45 tromey
69 ;; (tcl-hilit): New function from "Chris Alfeld" <calfeld@math.utah.edu>
70 ;; (tcl-mode): Call it
71 ;;
68 ;; Revision 1.46 1995/08/07 16:02:01 tromey 72 ;; Revision 1.46 1995/08/07 16:02:01 tromey
69 ;; (tcl-do-auto-fill): Only fill past fill-column; for 19.29. 73 ;; (tcl-do-auto-fill): Only fill past fill-column; for 19.29.
70 ;; (tcl-auto-fill-mode): Use force-mode-line-update. 74 ;; (tcl-auto-fill-mode): Use force-mode-line-update.
71 ;; 75 ;;
72 ;; Revision 1.45 1995/07/23 23:51:25 tromey 76 ;; Revision 1.45 1995/07/23 23:51:25 tromey
353 (if (and (string-match "19\\." emacs-version) 357 (if (and (string-match "19\\." emacs-version)
354 (not (string-match "XEmacs" emacs-version))) 358 (not (string-match "XEmacs" emacs-version)))
355 (require 'imenu)) 359 (require 'imenu))
356 ())) 360 ()))
357 361
358 (defconst tcl-version "$Revision: 1.46 $") 362 (defconst tcl-version "$Revision: 1.47 $")
359 (defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>") 363 (defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>")
360 364
361 ;; 365 ;;
362 ;; User variables. 366 ;; User variables.
363 ;; 367 ;;
1437 ;; tcl-beginning-of-defun. Also has incestuous knowledge about the 1441 ;; tcl-beginning-of-defun. Also has incestuous knowledge about the
1438 ;; format of tcl-proc-regexp. 1442 ;; format of tcl-proc-regexp.
1439 (defun add-log-tcl-defun () 1443 (defun add-log-tcl-defun ()
1440 "Return name of Tcl function point is in, or nil." 1444 "Return name of Tcl function point is in, or nil."
1441 (save-excursion 1445 (save-excursion
1442 (if (re-search-backward 1446 (tcl-beginning-of-defun)
1443 (concat tcl-proc-regexp "\\([^ \t\n{]+\\)") nil t) 1447 (forward-char)
1448 (if (looking-at (concat tcl-proc-regexp "\\([^ \t\n{]+\\)"))
1444 (buffer-substring (match-beginning 2) 1449 (buffer-substring (match-beginning 2)
1445 (match-end 2))))) 1450 (match-end 2)))))
1446 1451
1447 (defun tcl-outline-level () 1452 (defun tcl-outline-level ()
1448 (save-excursion 1453 (save-excursion