diff options
| author | Gerd Moellmann | 2001-01-29 20:58:49 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-01-29 20:58:49 +0000 |
| commit | 850d50459638ef08775ead69eab40abaea2a5006 (patch) | |
| tree | acfde525fc7fb209e2510895e8ff7ce022d8131f | |
| parent | 96111f48133b927c0ab43e8931370cc53e56c29c (diff) | |
| download | emacs-850d50459638ef08775ead69eab40abaea2a5006.tar.gz emacs-850d50459638ef08775ead69eab40abaea2a5006.zip | |
(outline, dabbrev, add-log): Require when
compiling.
(tcl-using-emacs-19-23): Consider Emacs 21+.
(tcl-help-directory-list, tcl-command-switches): Fix :type.
(tcl-add-emacs-menu): Supply menu name.
(tcl-beginning-of-defun, tcl-end-of-defun): Defalias, don't fset.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/progmodes/tcl.el | 39 |
2 files changed, 31 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f8dcaf67ee2..181a02801a2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2001-01-29 Dave Love <fx@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/tcl.el (outline, dabbrev, add-log): Require when | ||
| 4 | compiling. | ||
| 5 | (tcl-using-emacs-19-23): Consider Emacs 21+. | ||
| 6 | (tcl-help-directory-list, tcl-command-switches): Fix :type. | ||
| 7 | (tcl-add-emacs-menu): Supply menu name. | ||
| 8 | (tcl-beginning-of-defun, tcl-end-of-defun): Defalias, don't fset. | ||
| 9 | |||
| 1 | 2001-01-29 Gerd Moellmann <gerd@gnu.org> | 10 | 2001-01-29 Gerd Moellmann <gerd@gnu.org> |
| 2 | 11 | ||
| 3 | * simple.el (delete-trailing-whitespace): Don't delete formfeeds. | 12 | * simple.el (delete-trailing-whitespace): Don't delete formfeeds. |
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 835c08ab63e..9e54726b81d 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | ;; tcl.el --- Tcl code editing commands for Emacs | 1 | ;; tcl.el --- Tcl code editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 1998, 1999, 2000 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. |
| 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.60 $ | 9 | ;; Version: $Revision: 1.61 $ |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | 12 | ||
| @@ -103,14 +103,19 @@ | |||
| 103 | 103 | ||
| 104 | ;;; Code: | 104 | ;;; Code: |
| 105 | 105 | ||
| 106 | (eval-when-compile | ||
| 107 | (require 'outline) | ||
| 108 | (require 'dabbrev) | ||
| 109 | (require 'add-log)) | ||
| 110 | |||
| 106 | ;; I sure wish Emacs had a package that made it easy to extract this | 111 | ;; I sure wish Emacs had a package that made it easy to extract this |
| 107 | ;; sort of information. Strange definition works with XEmacs 20.0. | 112 | ;; sort of information. Strange definition works with XEmacs 20.0. |
| 108 | (defconst tcl-using-emacs-19 (not (string-match "18\\." emacs-version)) | 113 | (defconst tcl-using-emacs-19 (not (string-match "18\\." emacs-version)) |
| 109 | "Non-nil if using Emacs 19.") | 114 | "Non-nil if using Emacs 19 or later.") |
| 110 | 115 | ||
| 111 | (defconst tcl-using-emacs-19-23 | 116 | (defconst tcl-using-emacs-19-23 |
| 112 | (or (string-match "19\\.\\(2[3-9]\\|[3-9][0-9]\\)" emacs-version) | 117 | (or (string-match "19\\.\\(2[3-9]\\|[3-9][0-9]\\)" emacs-version) |
| 113 | (string-match "^20\\." emacs-version)) | 118 | (string-match "^[2-9][0-9]\\." emacs-version)) |
| 114 | "Non-nil if using Emacs 19-23 or later.") | 119 | "Non-nil if using Emacs 19-23 or later.") |
| 115 | 120 | ||
| 116 | (defconst tcl-using-xemacs-19 (string-match "XEmacs" emacs-version) | 121 | (defconst tcl-using-xemacs-19 (string-match "XEmacs" emacs-version) |
| @@ -122,12 +127,12 @@ | |||
| 122 | ;; you have 19.22 or earlier, comment this out, or get imenu. | 127 | ;; you have 19.22 or earlier, comment this out, or get imenu. |
| 123 | (and (fboundp 'eval-when-compile) | 128 | (and (fboundp 'eval-when-compile) |
| 124 | (eval-when-compile | 129 | (eval-when-compile |
| 125 | (if (and (string-match "19\\." emacs-version) | 130 | (if (and (not (string< emacs-version "19.23")) |
| 126 | (not (string-match "XEmacs" emacs-version))) | 131 | (not (string-match "XEmacs" emacs-version))) |
| 127 | (require 'imenu)) | 132 | (require 'imenu)) |
| 128 | ())) | 133 | ())) |
| 129 | 134 | ||
| 130 | (defconst tcl-version "$Revision: 1.60 $") | 135 | (defconst tcl-version "$Revision: 1.61 $") |
| 131 | (defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>") | 136 | (defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>") |
| 132 | 137 | ||
| 133 | ;; | 138 | ;; |
| @@ -194,7 +199,7 @@ taken to mean `smart'. The default is `smart'." | |||
| 194 | (defcustom tcl-help-directory-list nil | 199 | (defcustom tcl-help-directory-list nil |
| 195 | "*List of topmost directories containing TclX help files." | 200 | "*List of topmost directories containing TclX help files." |
| 196 | :group 'tcl | 201 | :group 'tcl |
| 197 | :type '(list directory)) | 202 | :type '(repeat directory)) |
| 198 | 203 | ||
| 199 | (defcustom tcl-use-smart-word-finder t | 204 | (defcustom tcl-use-smart-word-finder t |
| 200 | "*If not nil, use smart way to find current word, for Tcl help feature." | 205 | "*If not nil, use smart way to find current word, for Tcl help feature." |
| @@ -209,7 +214,7 @@ taken to mean `smart'. The default is `smart'." | |||
| 209 | (defcustom tcl-command-switches nil | 214 | (defcustom tcl-command-switches nil |
| 210 | "*List of switches to supply to the `tcl-application' program." | 215 | "*List of switches to supply to the `tcl-application' program." |
| 211 | :group 'tcl | 216 | :group 'tcl |
| 212 | :type '(list string)) | 217 | :type '(repeat string)) |
| 213 | 218 | ||
| 214 | (defcustom tcl-prompt-regexp "^\\(% \\|\\)" | 219 | (defcustom tcl-prompt-regexp "^\\(% \\|\\)" |
| 215 | "*If not nil, a regexp that will match the prompt in the inferior process. | 220 | "*If not nil, a regexp that will match the prompt in the inferior process. |
| @@ -298,7 +303,7 @@ quoted for Tcl." | |||
| 298 | ;; Emacs does menus via keymaps. Do it in a function in case we | 303 | ;; Emacs does menus via keymaps. Do it in a function in case we |
| 299 | ;; later decide to add it to inferior Tcl mode as well. | 304 | ;; later decide to add it to inferior Tcl mode as well. |
| 300 | (defun tcl-add-emacs-menu (map) | 305 | (defun tcl-add-emacs-menu (map) |
| 301 | (define-key map [menu-bar] (make-sparse-keymap)) | 306 | (define-key map [menu-bar] (make-sparse-keymap "Tcl")) |
| 302 | ;; This fails in Emacs 19.22 and earlier. | 307 | ;; This fails in Emacs 19.22 and earlier. |
| 303 | (require 'lmenu) | 308 | (require 'lmenu) |
| 304 | (let ((menu (make-lucid-menu-keymap "Tcl" tcl-xemacs-menu))) | 309 | (let ((menu (make-lucid-menu-keymap "Tcl" tcl-xemacs-menu))) |
| @@ -599,16 +604,16 @@ An end of a defun is found by moving forward from the beginning of one." | |||
| 599 | 604 | ||
| 600 | ;; We can now use begining-of-defun as long as we set up a | 605 | ;; We can now use begining-of-defun as long as we set up a |
| 601 | ;; certain regexp. In Emacs 18, we need our own function. | 606 | ;; certain regexp. In Emacs 18, we need our own function. |
| 602 | (fset 'tcl-beginning-of-defun | 607 | (defalias 'tcl-beginning-of-defun |
| 603 | (if tcl-using-emacs-19 | 608 | (if tcl-using-emacs-19 |
| 604 | 'beginning-of-defun | 609 | 'beginning-of-defun |
| 605 | 'tcl-internal-beginning-of-defun)) | 610 | 'tcl-internal-beginning-of-defun)) |
| 606 | 611 | ||
| 607 | ;; Ditto end-of-defun. | 612 | ;; Ditto end-of-defun. |
| 608 | (fset 'tcl-end-of-defun | 613 | (defalias 'tcl-end-of-defun |
| 609 | (if (and tcl-using-emacs-19 (not tcl-using-xemacs-19)) | 614 | (if (and tcl-using-emacs-19 (not tcl-using-xemacs-19)) |
| 610 | 'end-of-defun | 615 | 'end-of-defun |
| 611 | 'tcl-internal-end-of-defun)) | 616 | 'tcl-internal-end-of-defun)) |
| 612 | 617 | ||
| 613 | ;; Internal mark-defun that is used for losing Emacsen. | 618 | ;; Internal mark-defun that is used for losing Emacsen. |
| 614 | (defun tcl-internal-mark-defun () | 619 | (defun tcl-internal-mark-defun () |