From: Eli Zaretskii Date: Fri, 12 Apr 2002 17:15:44 +0000 (+0000) Subject: (tcl-do-fill-paragraph): Find and fill on more X-Git-Tag: emacs-pretest-21.2.91~312 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6828ed1951cfc951329faddb93ca432cae55901a;p=emacs.git (tcl-do-fill-paragraph): Find and fill on more natural paragraph boundaries. Don't fail at beginning of buffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f273a15128..86b64dbd356 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-04-12 Tom Tromey + + * progmodes/tcl.el (tcl-do-fill-paragraph): Find and fill on more + natural paragraph boundaries. Don't fail at beginning of buffer. + 2002-04-12 Eli Zaretskii * progmodes/compile.el (compile-internal): Fix the change from diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 2947b7acaf6..a1aa420ae54 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -1,12 +1,12 @@ ;;; tcl.el --- Tcl code editing commands for Emacs -;; Copyright (C) 1994, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1994,1998,1999,2000,2001,2002 Free Software Foundation, Inc. -;; Maintainer: FSF -;; Author: Tom Tromey +;; Maintainer: Tom Tromey +;; Author: Tom Tromey ;; Chris Lindblad ;; Keywords: languages tcl modes -;; Version: $Revision: 1.64 $ +;; Version: $Revision: 1.64.4.1 $ ;; This file is part of GNU Emacs. @@ -132,7 +132,7 @@ (require 'imenu)) ())) -(defconst tcl-version "$Revision: 1.64 $") +(defconst tcl-version "$Revision: 1.64.4.1 $") (defconst tcl-maintainer "Tom Tromey ") ;; @@ -1542,14 +1542,14 @@ This is faster that `tcl-hairy-in-comment', but is correct less often." p-start p-end) ;; Search backwards. (save-excursion - (while (looking-at "^[ \t]*#") + (while (and (looking-at "^[ \t]*#[ \t]*[^ \t\n]") + (not (bobp))) (forward-line -1)) - (forward-line) (setq p-start (point))) ;; Search forwards. (save-excursion - (while (looking-at "^[ \t]*#") + (while (looking-at "^[ \t]*#[ \t]*[^ \t\n]") (forward-line)) (setq p-end (point)))