Commit 2064ba4d authored by Tom Tromey's avatar Tom Tromey
Browse files

(tcl-do-auto-fill): Only fill past fill-column; for 19.29.

(tcl-auto-fill-mode): Use force-mode-line-update.
parent dac6f673
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
;; Author: Tom Tromey <tromey@busco.lanl.gov> ;; Author: Tom Tromey <tromey@busco.lanl.gov>
;; Chris Lindblad <cjl@lcs.mit.edu> ;; Chris Lindblad <cjl@lcs.mit.edu>
;; Keywords: languages tcl modes ;; Keywords: languages tcl modes
;; Version: $Revision: 1.44 $ ;; Version: $Revision: 1.45 $
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
;; LCD Archive Entry: ;; LCD Archive Entry:
;; tcl|Tom Tromey|tromey@busco.lanl.gov| ;; tcl|Tom Tromey|tromey@busco.lanl.gov|
;; Major mode for editing Tcl| ;; Major mode for editing Tcl|
;; $Date: 1995/07/23 20:26:47 $|$Revision: 1.44 $|~/modes/tcl.el.Z| ;; $Date: 1995/07/23 23:51:25 $|$Revision: 1.45 $|~/modes/tcl.el.Z|
;; CUSTOMIZATION NOTES: ;; CUSTOMIZATION NOTES:
;; * tcl-proc-list can be used to customize a list of things that ;; * tcl-proc-list can be used to customize a list of things that
...@@ -65,6 +65,11 @@ ...@@ -65,6 +65,11 @@
;; Change log: ;; Change log:
;; $Log: tcl.el,v $ ;; $Log: tcl.el,v $
;; Revision 1.45 1995/07/23 23:51:25 tromey
;; (tcl-word-no-props): New function.
;; (tcl-figure-type): Use it.
;; (tcl-current-word): Ditto.
;;
;; Revision 1.44 1995/07/23 20:26:47 tromey ;; Revision 1.44 1995/07/23 20:26:47 tromey
;; Doc fixes. ;; Doc fixes.
;; ;;
...@@ -345,7 +350,7 @@ ...@@ -345,7 +350,7 @@
(require 'imenu)) (require 'imenu))
())) ()))
(defconst tcl-version "$Revision: 1.44 $") (defconst tcl-version "$Revision: 1.45 $")
(defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>") (defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>")
;; ;;
...@@ -1743,21 +1748,22 @@ of comment." ...@@ -1743,21 +1748,22 @@ of comment."
(defun tcl-do-auto-fill () (defun tcl-do-auto-fill ()
"Auto-fill function for Tcl mode. Only auto-fills in a comment." "Auto-fill function for Tcl mode. Only auto-fills in a comment."
(let ((fill-prefix "# ") (if (> (current-column) fill-column)
in-comment col) (let ((fill-prefix "# ")
(save-excursion in-comment col)
(setq in-comment (tcl-in-comment)) (save-excursion
(if in-comment (setq in-comment (tcl-in-comment))
(setq col (1- (current-column))))) (if in-comment
(if in-comment (setq col (1- (current-column)))))
(progn (if in-comment
(do-auto-fill) (progn
(save-excursion (do-auto-fill)
(back-to-indentation) (save-excursion
(delete-region (point) (save-excursion (back-to-indentation)
(beginning-of-line) (delete-region (point) (save-excursion
(point))) (beginning-of-line)
(indent-to-column col)))))) (point)))
(indent-to-column col)))))))
...@@ -1956,9 +1962,7 @@ Prefix argument means switch to the Tcl buffer afterwards." ...@@ -1956,9 +1962,7 @@ Prefix argument means switch to the Tcl buffer afterwards."
(> (prefix-numeric-value arg) 0)) (> (prefix-numeric-value arg) 0))
'tcl-do-auto-fill 'tcl-do-auto-fill
nil)) nil))
;; Update mode line. FIXME I'd use force-mode-line-update, but I (force-mode-line-update)))
;; don't know if it exists in v18.
(set-buffer-modified-p (buffer-modified-p))))
(defun tcl-electric-hash (&optional count) (defun tcl-electric-hash (&optional count)
"Insert a `#' and quote if it does not start a real comment. "Insert a `#' and quote if it does not start a real comment.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment