Mercurial > emacs
diff lisp/emacs-lisp/lisp-mode.el @ 41310:ab1a42ecf560
(lisp-fill-paragraph): Don't move back to a line without a comment.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 20 Nov 2001 15:10:25 +0000 |
parents | a5e4e3a88a9e |
children | 15d7e3180dcf |
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el Tue Nov 20 14:20:41 2001 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Tue Nov 20 15:10:25 2001 +0000 @@ -1082,8 +1082,11 @@ (narrow-to-region ;; Find the first line we should include in the region to fill. (save-excursion - (while (and (looking-at "[ \t]*;") - (zerop (forward-line -1)))) + (while (and (zerop (forward-line -1)) + (looking-at "[ \t]*;"))) + ;; We may have gone too far. Go forward again. + (or (looking-at ".*;") + (forward-line 1)) (point)) ;; Find the beginning of the first line past the region to fill. (save-excursion