# HG changeset patch # User Stefan Monnier # Date 1006269025 0 # Node ID ab1a42ecf56059502b8b399116a3e87cc5b5604f # Parent 8c4c4027c7bdad1f4ab71f93806afe219365e5e7 (lisp-fill-paragraph): Don't move back to a line without a comment. diff -r 8c4c4027c7bd -r ab1a42ecf560 lisp/emacs-lisp/lisp-mode.el --- 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