diff options
| author | Tom Tromey | 1995-08-07 16:02:01 +0000 |
|---|---|---|
| committer | Tom Tromey | 1995-08-07 16:02:01 +0000 |
| commit | 2064ba4d5877b49e2b39a05bd7e88d1d341aaa67 (patch) | |
| tree | 918de7fc6e340841840da9f4380799adff36463c | |
| parent | dac6f673310877cc4e5d097752489f84f046b083 (diff) | |
| download | emacs-2064ba4d5877b49e2b39a05bd7e88d1d341aaa67.tar.gz emacs-2064ba4d5877b49e2b39a05bd7e88d1d341aaa67.zip | |
(tcl-do-auto-fill): Only fill past fill-column; for 19.29.
(tcl-auto-fill-mode): Use force-mode-line-update.
| -rw-r--r-- | lisp/progmodes/tcl.el | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index f77a2603b0d..abf2f7cbd6d 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el | |||
| @@ -6,7 +6,7 @@ | |||
| 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.44 $ | 9 | ;; Version: $Revision: 1.45 $ |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | 12 | ||
| @@ -51,7 +51,7 @@ | |||
| 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: 1995/07/23 20:26:47 $|$Revision: 1.44 $|~/modes/tcl.el.Z| | 54 | ;; $Date: 1995/07/23 23:51:25 $|$Revision: 1.45 $|~/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 |
| @@ -65,6 +65,11 @@ | |||
| 65 | 65 | ||
| 66 | ;; Change log: | 66 | ;; Change log: |
| 67 | ;; $Log: tcl.el,v $ | 67 | ;; $Log: tcl.el,v $ |
| 68 | ;; Revision 1.45 1995/07/23 23:51:25 tromey | ||
| 69 | ;; (tcl-word-no-props): New function. | ||
| 70 | ;; (tcl-figure-type): Use it. | ||
| 71 | ;; (tcl-current-word): Ditto. | ||
| 72 | ;; | ||
| 68 | ;; Revision 1.44 1995/07/23 20:26:47 tromey | 73 | ;; Revision 1.44 1995/07/23 20:26:47 tromey |
| 69 | ;; Doc fixes. | 74 | ;; Doc fixes. |
| 70 | ;; | 75 | ;; |
| @@ -345,7 +350,7 @@ | |||
| 345 | (require 'imenu)) | 350 | (require 'imenu)) |
| 346 | ())) | 351 | ())) |
| 347 | 352 | ||
| 348 | (defconst tcl-version "$Revision: 1.44 $") | 353 | (defconst tcl-version "$Revision: 1.45 $") |
| 349 | (defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>") | 354 | (defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>") |
| 350 | 355 | ||
| 351 | ;; | 356 | ;; |
| @@ -1743,21 +1748,22 @@ of comment." | |||
| 1743 | 1748 | ||
| 1744 | (defun tcl-do-auto-fill () | 1749 | (defun tcl-do-auto-fill () |
| 1745 | "Auto-fill function for Tcl mode. Only auto-fills in a comment." | 1750 | "Auto-fill function for Tcl mode. Only auto-fills in a comment." |
| 1746 | (let ((fill-prefix "# ") | 1751 | (if (> (current-column) fill-column) |
| 1747 | in-comment col) | 1752 | (let ((fill-prefix "# ") |
| 1748 | (save-excursion | 1753 | in-comment col) |
| 1749 | (setq in-comment (tcl-in-comment)) | 1754 | (save-excursion |
| 1750 | (if in-comment | 1755 | (setq in-comment (tcl-in-comment)) |
| 1751 | (setq col (1- (current-column))))) | 1756 | (if in-comment |
| 1752 | (if in-comment | 1757 | (setq col (1- (current-column))))) |
| 1753 | (progn | 1758 | (if in-comment |
| 1754 | (do-auto-fill) | 1759 | (progn |
| 1755 | (save-excursion | 1760 | (do-auto-fill) |
| 1756 | (back-to-indentation) | 1761 | (save-excursion |
| 1757 | (delete-region (point) (save-excursion | 1762 | (back-to-indentation) |
| 1758 | (beginning-of-line) | 1763 | (delete-region (point) (save-excursion |
| 1759 | (point))) | 1764 | (beginning-of-line) |
| 1760 | (indent-to-column col)))))) | 1765 | (point))) |
| 1766 | (indent-to-column col))))))) | ||
| 1761 | 1767 | ||
| 1762 | 1768 | ||
| 1763 | 1769 | ||
| @@ -1956,9 +1962,7 @@ Prefix argument means switch to the Tcl buffer afterwards." | |||
| 1956 | (> (prefix-numeric-value arg) 0)) | 1962 | (> (prefix-numeric-value arg) 0)) |
| 1957 | 'tcl-do-auto-fill | 1963 | 'tcl-do-auto-fill |
| 1958 | nil)) | 1964 | nil)) |
| 1959 | ;; Update mode line. FIXME I'd use force-mode-line-update, but I | 1965 | (force-mode-line-update))) |
| 1960 | ;; don't know if it exists in v18. | ||
| 1961 | (set-buffer-modified-p (buffer-modified-p)))) | ||
| 1962 | 1966 | ||
| 1963 | (defun tcl-electric-hash (&optional count) | 1967 | (defun tcl-electric-hash (&optional count) |
| 1964 | "Insert a `#' and quote if it does not start a real comment. | 1968 | "Insert a `#' and quote if it does not start a real comment. |