aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/tcl.el
diff options
context:
space:
mode:
authorTom Tromey <[email protected]>1995-07-09 01:07:57 +0000
committerTom Tromey <[email protected]>1995-07-09 01:07:57 +0000
commit8ebb39c016ef40df3fce7f05bbd2f025d962224a (patch)
tree2cbc7bbbb0903976ea5c04fbb33f4790c39707a7 /lisp/progmodes/tcl.el
parentfdb3286ede1cb01161cf334db7695f2029bbc873 (diff)
(tcl-imenu-create-index-function): Work with imenu from Emacs 19.29
Diffstat (limited to 'lisp/progmodes/tcl.el')
-rw-r--r--lisp/progmodes/tcl.el30
1 files changed, 17 insertions, 13 deletions
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index abb6ca403f..c4c280cd67 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -6,7 +6,7 @@
;; Author: Tom Tromey <[email protected]>
;; Chris Lindblad <[email protected]>
;; Keywords: languages tcl modes
-;; Version: $Revision: 1.34 $
+;; Version: $Revision: 1.35 $
;; This file is part of GNU Emacs.
@@ -51,7 +51,7 @@
;; LCD Archive Entry:
;; tcl|Tom Tromey|[email protected]|
;; Major mode for editing Tcl|
-;; $Date: 1995/06/27 20:06:05 $|$Revision: 1.34 $|~/modes/tcl.el.Z|
+;; $Date: 1995/06/27 20:12:00 $|$Revision: 1.35 $|~/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.35 1995/06/27 20:12:00 tromey
+;; (tcl-type-alist): More itcl changes.
+;;
;; Revision 1.34 1995/06/27 20:06:05 tromey
;; More changes for itcl.
;; Bug fixes for Emacs 19.29.
@@ -313,7 +316,7 @@
(require 'imenu))
()))
-(defconst tcl-version "$Revision: 1.34 $")
+(defconst tcl-version "$Revision: 1.35 $")
(defconst tcl-maintainer "Tom Tromey <[email protected]>")
;;
@@ -1351,17 +1354,18 @@ Returns nil if line starts inside a string, t if in a comment."
(defun tcl-imenu-create-index-function ()
"Generate alist of indices for imenu."
(let ((re (concat tcl-proc-regexp "\\([^ \t\n{]+\\)"))
- alist)
- (imenu-progress-message 0)
+ alist prev-pos)
(goto-char (point-min))
- (while (re-search-forward re nil t)
- (imenu-progress-message nil)
- ;; Position on start of proc name, not beginning of line.
- (setq alist (cons
- (cons (buffer-substring (match-beginning 2) (match-end 2))
- (match-beginning 2))
- alist)))
- (imenu-progress-message 100)
+ (imenu-progress-message prev-pos 0)
+ (save-match-data
+ (while (re-search-forward re nil t)
+ (imenu-progress-message prev-pos)
+ ;; Position on start of proc name, not beginning of line.
+ (setq alist (cons
+ (cons (buffer-substring (match-beginning 2) (match-end 2))
+ (match-beginning 2))
+ alist))))
+ (imenu-progress-message prev-pos 100)
(nreverse alist)))
;; FIXME Definition of function is very ad-hoc. Should use