aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-07-09 05:20:42 +0000
committerStefan Monnier2006-07-09 05:20:42 +0000
commit5fc5b7e842f10fca77536a1a7742ef76ec224023 (patch)
treeb1187fc1bf4d34fd538249aae16c1612344b22af
parentbf88ca63905ad2afc61fae92e8fba048819d4521 (diff)
downloademacs-5fc5b7e842f10fca77536a1a7742ef76ec224023.tar.gz
emacs-5fc5b7e842f10fca77536a1a7742ef76ec224023.zip
(fill-region-as-paragraph): Refine last change.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/textmodes/fill.el9
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 @@
12006-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * textmodes/fill.el (fill-region-as-paragraph): Refine last change.
4
12006-07-08 Richard Stallman <rms@gnu.org> 52006-07-08 Richard Stallman <rms@gnu.org>
2 6
3 * term/x-win.el (x-handle-display): Add doc string. 7 * term/x-win.el (x-handle-display): Add doc string.
4 8
5 * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. 9 * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
6 10
7 * subr.el (def-edebug-spec): Moved here. 11 * subr.el (def-edebug-spec): Move here.
8 * emacs-lisp/edebug.el (def-edebug-spec): Moved to subr.el. 12 * emacs-lisp/edebug.el (def-edebug-spec): Move to subr.el.
9 13
10 * imenu.el (imenu-choose-buffer-index): Doc fix. 14 * imenu.el (imenu-choose-buffer-index): Doc fix.
11 15
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."
628 (let ((from-plus-indent (point)) 628 (let ((from-plus-indent (point))
629 (oneleft nil)) 629 (oneleft nil))
630 630
631 (beginning-of-line)
631 ;; We used to round up to whole line, but that prevents us from 632 ;; We used to round up to whole line, but that prevents us from
632 ;; correctly handling filling of mixed code-and-comment where we 633 ;; correctly handling filling of mixed code-and-comment where we do want
633 ;; do want to fill the comment but not the code. 634 ;; to fill the comment but not the code. So only use (point) if it's
634 ;; (beginning-of-line) (setq from (point)) 635 ;; further than `from', which means that `from' is followed by some
636 ;; number of empty lines.
637 (setq from (max (point) from))
635 638
636 ;; Delete all but one soft newline at end of region. 639 ;; Delete all but one soft newline at end of region.
637 ;; And leave TO before that one. 640 ;; And leave TO before that one.