# HG changeset patch # User Tom Tromey # Date 807811321 0 # Node ID 841ba4b250a479c7c92dac9a099d0ec3eee4633e # Parent 913a19cf074a405dc0d3f0f2c844e563b1ccf62d (tcl-do-auto-fill): Only fill past fill-column; for 19.29. (tcl-auto-fill-mode): Use force-mode-line-update. diff -r 913a19cf074a -r 841ba4b250a4 lisp/progmodes/tcl.el --- a/lisp/progmodes/tcl.el Mon Aug 07 08:45:00 1995 +0000 +++ b/lisp/progmodes/tcl.el Mon Aug 07 16:02:01 1995 +0000 @@ -6,7 +6,7 @@ ;; Author: Tom Tromey ;; Chris Lindblad ;; Keywords: languages tcl modes -;; Version: $Revision: 1.44 $ +;; Version: $Revision: 1.45 $ ;; This file is part of GNU Emacs. @@ -51,7 +51,7 @@ ;; LCD Archive Entry: ;; tcl|Tom Tromey|tromey@busco.lanl.gov| ;; 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: ;; * tcl-proc-list can be used to customize a list of things that @@ -65,6 +65,11 @@ ;; Change log: ;; $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 ;; Doc fixes. ;; @@ -345,7 +350,7 @@ (require 'imenu)) ())) -(defconst tcl-version "$Revision: 1.44 $") +(defconst tcl-version "$Revision: 1.45 $") (defconst tcl-maintainer "Tom Tromey ") ;; @@ -1743,21 +1748,22 @@ (defun tcl-do-auto-fill () "Auto-fill function for Tcl mode. Only auto-fills in a comment." - (let ((fill-prefix "# ") - in-comment col) - (save-excursion - (setq in-comment (tcl-in-comment)) - (if in-comment - (setq col (1- (current-column))))) - (if in-comment - (progn - (do-auto-fill) - (save-excursion - (back-to-indentation) - (delete-region (point) (save-excursion - (beginning-of-line) - (point))) - (indent-to-column col)))))) + (if (> (current-column) fill-column) + (let ((fill-prefix "# ") + in-comment col) + (save-excursion + (setq in-comment (tcl-in-comment)) + (if in-comment + (setq col (1- (current-column))))) + (if in-comment + (progn + (do-auto-fill) + (save-excursion + (back-to-indentation) + (delete-region (point) (save-excursion + (beginning-of-line) + (point))) + (indent-to-column col))))))) @@ -1956,9 +1962,7 @@ (> (prefix-numeric-value arg) 0)) 'tcl-do-auto-fill nil)) - ;; Update mode line. FIXME I'd use force-mode-line-update, but I - ;; don't know if it exists in v18. - (set-buffer-modified-p (buffer-modified-p)))) + (force-mode-line-update))) (defun tcl-electric-hash (&optional count) "Insert a `#' and quote if it does not start a real comment.