]> git.eshelyaron.com Git - emacs.git/commitdiff
(tcl-imenu-generic-expression): New value.
authorRichard M. Stallman <rms@gnu.org>
Mon, 1 Apr 2002 20:22:02 +0000 (20:22 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 1 Apr 2002 20:22:02 +0000 (20:22 +0000)
(tcl-imenu-create-index-function): Function deleted.
(tcl-mode): Check for filladapt-mode.
Use tcl-imenu-generic-expression instead of
tcl-imenu-create-index-function.
(inferior-tcl-mode): Doc fix.
Change not legally significant.

lisp/ChangeLog
lisp/progmodes/tcl.el

index e3429a6f6439d331fe3cd101c6ed1aeb02cd0df7..8e578046ef18b5f5befd166d676bb2ea5e7807bb 100644 (file)
@@ -1,3 +1,13 @@
+2002-04-01  Ville Skytt\e,Ad\e(B  <ville.skytta@xemacs.org>
+
+       * tcl.el (tcl-imenu-generic-expression): New value.
+       (tcl-imenu-create-index-function): Function deleted.
+       (tcl-mode): Check for filladapt-mode.
+       Use tcl-imenu-generic-expression instead of
+       tcl-imenu-create-index-function.
+       (inferior-tcl-mode): Doc fix.
+       Change not legally significant.
+       
 2002-04-01  Pavel Jan\e,Bm\e(Bk  <Pavel@Janik.cz>
 
        * cus-start.el: Rename `x-autoselect-window' to `autoselect-window'.
index 2166af583d21c10156a32d3b78a624279f1c109f..aabe3687f7301cebaefe87e67f4973c7cb570813 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Tom Tromey <tromey@redhat.com>
 ;;    Chris Lindblad <cjl@lcs.mit.edu>
 ;; Keywords: languages tcl modes
-;; Version: $Revision: 1.66 $
+;; Version: $Revision: 1.67 $
 
 ;; This file is part of GNU Emacs.
 
@@ -506,6 +506,11 @@ Uses variables `tcl-proc-regexp' and `tcl-keyword-list'."
     ()
   (tcl-set-font-lock-keywords))
 
+
+(defvar tcl-imenu-generic-expression
+  '((nil "^proc[ \t]+\\([-A-Za-z0-9_:+*]+\\)" 1))
+  "Imenu generic expression for `tcl-mode'.  See `imenu-generic-expression'.")
+
 \f
 
 ;;
@@ -549,8 +554,10 @@ Commands:
   (set (make-local-variable 'paragraph-start) "$\\|\f")
   (set (make-local-variable 'paragraph-separate) paragraph-start)
 
-  (set (make-local-variable 'paragraph-ignore-fill-prefix) t)
-  (set (make-local-variable 'fill-paragraph-function) 'tcl-do-fill-paragraph)
+  (unless (and (boundp 'filladapt-mode) filladapt-mode)
+    (set (make-local-variable 'paragraph-ignore-fill-prefix) t)
+    (set (make-local-variable 'fill-paragraph-function)
+        'tcl-do-fill-paragraph))
 
   (set (make-local-variable 'indent-line-function) 'tcl-indent-line)
   (set (make-local-variable 'comment-indent-function) 'tcl-comment-indent)
@@ -571,8 +578,8 @@ Commands:
         (font-lock-syntactic-keywords . tcl-font-lock-syntactic-keywords)
         (parse-sexp-lookup-properties . t)))
 
-  (set (make-local-variable 'imenu-create-index-function)
-       'tcl-imenu-create-index-function)
+  (set (make-local-variable 'imenu-generic-expression)
+       'tcl-imenu-generic-expression)
   
   ;; Settings for new dabbrev code.
   (set (make-local-variable 'dabbrev-case-fold-search) nil)
@@ -987,23 +994,6 @@ Returns nil if line starts inside a string, t if in a comment."
 ;; Interfaces to other packages.
 ;;
 
-(defun tcl-imenu-create-index-function ()
-  "Generate alist of indices for `imenu'."
-  (let ((re (concat tcl-proc-regexp "\\([^ \t\n{]+\\)"))
-       alist prev-pos)
-    (goto-char (point-min))
-    (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
 ;; beginning-of-defun.  Also has incestuous knowledge about the
 ;; format of tcl-proc-regexp.
@@ -1108,7 +1098,7 @@ Prefix argument means switch to the Tcl buffer afterwards."
 (define-derived-mode inferior-tcl-mode comint-mode "Inferior Tcl"
   "Major mode for interacting with Tcl interpreter.
 
-A Tcl process can be started with M-x inferior-tcl.
+You can start a Tcl process with \\[inferior-tcl].
 
 Entry to this mode runs the normal hooks `comint-mode-hook' and
 `inferior-tcl-mode-hook', in that order.