comparison lisp/progmodes/tcl.el @ 43437:55d255989f05

(tcl-do-fill-paragraph): Find and fill on more natural paragraph boundaries. Don't fail at beginning of buffer.
author Richard M. Stallman <rms@gnu.org>
date Wed, 20 Feb 2002 22:33:35 +0000
parents 6a46751c85df
children a1c4f9151348
comparison
equal deleted inserted replaced
43436:1f1affb402ce 43437:55d255989f05
1 ;;; tcl.el --- Tcl code editing commands for Emacs 1 ;;; tcl.el --- Tcl code editing commands for Emacs
2 2
3 ;; Copyright (C) 1994, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 3 ;; Copyright (C) 1994, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 4
5 ;; Maintainer: Tom Tromey <tromey@busco.lanl.gov> 5 ;; Maintainer: Tom Tromey <tromey@redhat.com>
6 ;; Author: Tom Tromey <tromey@busco.lanl.gov> 6 ;; Author: Tom Tromey <tromey@redhat.com>
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.64 $ 9 ;; Version: $Revision: 1.65 $
10 10
11 ;; This file is part of GNU Emacs. 11 ;; This file is part of GNU Emacs.
12 12
13 ;; GNU Emacs is free software; you can redistribute it and/or modify 13 ;; GNU Emacs is free software; you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by 14 ;; it under the terms of the GNU General Public License as published by
1267 (point)) 1267 (point))
1268 where)) 1268 where))
1269 p-start p-end) 1269 p-start p-end)
1270 ;; Search backwards. 1270 ;; Search backwards.
1271 (save-excursion 1271 (save-excursion
1272 (while (looking-at "^[ \t]*#") 1272 (while (and (looking-at "^[ \t]*#[ \t]*[^ \t\n]")
1273 (not (bobp)))
1273 (forward-line -1)) 1274 (forward-line -1))
1274 (forward-line)
1275 (setq p-start (point))) 1275 (setq p-start (point)))
1276 1276
1277 ;; Search forwards. 1277 ;; Search forwards.
1278 (save-excursion 1278 (save-excursion
1279 (while (looking-at "^[ \t]*#") 1279 (while (looking-at "^[ \t]*#[ \t]*[^ \t\n]")
1280 (forward-line)) 1280 (forward-line))
1281 (setq p-end (point))) 1281 (setq p-end (point)))
1282 1282
1283 ;; Narrow and do the fill. 1283 ;; Narrow and do the fill.
1284 (save-restriction 1284 (save-restriction