summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1995-12-07 18:27:47 +0000
committerTom Tromey <tromey@redhat.com>1995-12-07 18:27:47 +0000
commitdc39965c213344c5a28fa5598a7555be615d6afe (patch)
treebbf6be75baf78cbf914a5a5cb455bc036fee5ddc
parent6751cdfe9a4890d03e7e15415a3ed3cef8aa31d7 (diff)
downloademacs-dc39965c213344c5a28fa5598a7555be615d6afe.tar.gz
(add-log-tcl-defun): Don't use tcl-beginning-of-defun; just go to end
of line before searching.
-rw-r--r--lisp/progmodes/tcl.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 725af3f86d2..03b8e86cfed 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -6,7 +6,7 @@
;; Author: Tom Tromey <tromey@busco.lanl.gov>
;; Chris Lindblad <cjl@lcs.mit.edu>
;; Keywords: languages tcl modes
-;; Version: $Revision: 1.47 $
+;; Version: $Revision: 1.48 $
;; This file is part of GNU Emacs.
@@ -51,7 +51,7 @@
;; LCD Archive Entry:
;; tcl|Tom Tromey|tromey@busco.lanl.gov|
;; Major mode for editing Tcl|
-;; $Date: 1995/08/22 17:49:45 $|$Revision: 1.47 $|~/modes/tcl.el.Z|
+;; $Date: 1995/12/07 18:18:21 $|$Revision: 1.48 $|~/modes/tcl.el.Z|
;; CUSTOMIZATION NOTES:
;; * tcl-proc-list can be used to customize a list of things that
@@ -65,6 +65,9 @@
;; Change log:
;; $Log: tcl.el,v $
+;; Revision 1.48 1995/12/07 18:18:21 tromey
+;; (add-log-tcl-defun): Now uses tcl-beginning-of-defun.
+;;
;; Revision 1.47 1995/08/22 17:49:45 tromey
;; (tcl-hilit): New function from "Chris Alfeld" <calfeld@math.utah.edu>
;; (tcl-mode): Call it
@@ -359,7 +362,7 @@
(require 'imenu))
()))
-(defconst tcl-version "$Revision: 1.47 $")
+(defconst tcl-version "$Revision: 1.48 $")
(defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>")
;;
@@ -1443,9 +1446,8 @@ Returns nil if line starts inside a string, t if in a comment."
(defun add-log-tcl-defun ()
"Return name of Tcl function point is in, or nil."
(save-excursion
- (tcl-beginning-of-defun)
- (forward-char)
- (if (looking-at (concat tcl-proc-regexp "\\([^ \t\n{]+\\)"))
+ (end-of-line)
+ (if (re-search-backward (concat tcl-proc-regexp "\\([^ \t\n{]+\\)") nil t)
(buffer-substring (match-beginning 2)
(match-end 2)))))