Mercurial > emacs
comparison lisp/progmodes/tcl.el @ 7613:0dc4969a8038
Fixes for imenu.
author | Tom Tromey <tromey@redhat.com> |
---|---|
date | Sun, 22 May 1994 05:26:51 +0000 |
parents | 3b16e6ed71cf |
children | 6fe5a25c0107 |
comparison
equal
deleted
inserted
replaced
7612:3b16e6ed71cf | 7613:0dc4969a8038 |
---|---|
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.7 $ | 9 ;; Version: $Revision: 1.8 $ |
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/05/03 01:23:42 $|$Revision: 1.7 $|~/modes/tcl.el.Z| | 54 ;; $Date: 1994/05/22 03:38:07 $|$Revision: 1.8 $|~/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.8 1994/05/22 03:38:07 tromey | |
69 ; Fixed menu support. | |
70 ; | |
68 ; Revision 1.7 1994/05/03 01:23:42 tromey | 71 ; Revision 1.7 1994/05/03 01:23:42 tromey |
69 ; *** empty log message *** | 72 ; *** empty log message *** |
70 ; | 73 ; |
71 ; Revision 1.6 1994/04/23 16:23:36 tromey | 74 ; Revision 1.6 1994/04/23 16:23:36 tromey |
72 ; Wrote tcl-indent-for-comment | 75 ; Wrote tcl-indent-for-comment |
765 (make-local-variable 'comment-end) | 768 (make-local-variable 'comment-end) |
766 (setq comment-end "") | 769 (setq comment-end "") |
767 | 770 |
768 (make-local-variable 'font-lock-keywords) | 771 (make-local-variable 'font-lock-keywords) |
769 (setq font-lock-keywords tcl-font-lock-keywords) | 772 (setq font-lock-keywords tcl-font-lock-keywords) |
773 | |
774 ;; The following only really makes sense under GNU Emacs 19. | |
770 (setq imenu-create-index-function 'tcl-imenu-create-index-function) | 775 (setq imenu-create-index-function 'tcl-imenu-create-index-function) |
771 (make-local-variable 'parse-sexp-ignore-comments) | 776 (make-local-variable 'parse-sexp-ignore-comments) |
772 | 777 |
773 (if tcl-using-emacs-19 | 778 (if tcl-using-emacs-19 |
774 (progn | 779 (progn |
1201 | 1206 |
1202 ;; | 1207 ;; |
1203 ;; Interfaces to other packages. | 1208 ;; Interfaces to other packages. |
1204 ;; | 1209 ;; |
1205 | 1210 |
1206 (autoload 'imenu-progress-message "imenu" "" nil 'macro) | 1211 ;; When compiling under GNU Emacs, load imenu during compilation. If |
1212 ;; you have 19.22 or earlier, comment this out, or get imenu. | |
1213 (eval-when-compile | |
1214 (if (and tcl-using-emacs | |
1215 (not tcl-using-lemacs-19)) | |
1216 (require 'imenu)) | |
1217 ()) | |
1207 | 1218 |
1208 (defun tcl-imenu-create-index-function () | 1219 (defun tcl-imenu-create-index-function () |
1209 "Generate alist of indices for imenu." | 1220 "Generate alist of indices for imenu." |
1210 (let ((re (concat tcl-proc-regexp "\\([^ \t\n{]+\\)")) | 1221 (let ((re (concat tcl-proc-regexp "\\([^ \t\n{]+\\)")) |
1211 alist) | 1222 alist) |