;; Author: Tom Tromey <tromey@busco.lanl.gov>
;; Chris Lindblad <cjl@lcs.mit.edu>
;; Keywords: languages tcl modes
-;; Version: $Revision: 1.44 $
+;; Version: $Revision: 1.45 $
;; This file is part of GNU Emacs.
;; 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
;; 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.
;;
(require 'imenu))
()))
-(defconst tcl-version "$Revision: 1.44 $")
+(defconst tcl-version "$Revision: 1.45 $")
(defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>")
;;
(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)))))))
\f
(> (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.