diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-07-09 05:20:42 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-07-09 05:20:42 +0000 |
commit | 5fc5b7e842f10fca77536a1a7742ef76ec224023 (patch) | |
tree | b1187fc1bf4d34fd538249aae16c1612344b22af /lisp | |
parent | bf88ca63905ad2afc61fae92e8fba048819d4521 (diff) | |
download | emacs-5fc5b7e842f10fca77536a1a7742ef76ec224023.tar.gz emacs-5fc5b7e842f10fca77536a1a7742ef76ec224023.tar.bz2 emacs-5fc5b7e842f10fca77536a1a7742ef76ec224023.zip |
(fill-region-as-paragraph): Refine last change.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 8 | ||||
-rw-r--r-- | lisp/textmodes/fill.el | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9732a3f5432..08832bd613e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,11 +1,15 @@ +2006-07-09 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/fill.el (fill-region-as-paragraph): Refine last change. + 2006-07-08 Richard Stallman <rms@gnu.org> * term/x-win.el (x-handle-display): Add doc string. * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. - * subr.el (def-edebug-spec): Moved here. - * emacs-lisp/edebug.el (def-edebug-spec): Moved to subr.el. + * subr.el (def-edebug-spec): Move here. + * emacs-lisp/edebug.el (def-edebug-spec): Move to subr.el. * imenu.el (imenu-choose-buffer-index): Doc fix. diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 409e9117674..95f73b56952 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -628,10 +628,13 @@ space does not end a sentence, so don't break a line there." (let ((from-plus-indent (point)) (oneleft nil)) + (beginning-of-line) ;; We used to round up to whole line, but that prevents us from - ;; correctly handling filling of mixed code-and-comment where we - ;; do want to fill the comment but not the code. - ;; (beginning-of-line) (setq from (point)) + ;; correctly handling filling of mixed code-and-comment where we do want + ;; to fill the comment but not the code. So only use (point) if it's + ;; further than `from', which means that `from' is followed by some + ;; number of empty lines. + (setq from (max (point) from)) ;; Delete all but one soft newline at end of region. ;; And leave TO before that one. |