diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2001-11-20 15:10:42 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2001-11-20 15:10:42 +0000 |
commit | ed3c639167e8f4fbe193c5d912331bd15a565c3a (patch) | |
tree | 4cab32350f96c943c1d304b5e86929635936c34e /lisp/emacs-lisp/lisp-mode.el | |
parent | a8e1e57f4ced6c635d959d8d8d30b65efbbbf8e4 (diff) | |
download | emacs-ed3c639167e8f4fbe193c5d912331bd15a565c3a.tar.gz emacs-ed3c639167e8f4fbe193c5d912331bd15a565c3a.tar.bz2 emacs-ed3c639167e8f4fbe193c5d912331bd15a565c3a.zip |
(lisp-fill-paragraph): Don't move back to a line without a comment.
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index ceea24168ef..38d607d3b25 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1082,8 +1082,11 @@ and initial semicolons." (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 |