Commit 5fc5b7e8 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(fill-region-as-paragraph): Refine last change.

parent bf88ca63
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> 2006-07-08 Richard Stallman <rms@gnu.org>
* term/x-win.el (x-handle-display): Add doc string. * term/x-win.el (x-handle-display): Add doc string.
* emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix.
* subr.el (def-edebug-spec): Moved here. * subr.el (def-edebug-spec): Move here.
* emacs-lisp/edebug.el (def-edebug-spec): Moved to subr.el. * emacs-lisp/edebug.el (def-edebug-spec): Move to subr.el.
* imenu.el (imenu-choose-buffer-index): Doc fix. * imenu.el (imenu-choose-buffer-index): Doc fix.
......
...@@ -628,10 +628,13 @@ space does not end a sentence, so don't break a line there." ...@@ -628,10 +628,13 @@ space does not end a sentence, so don't break a line there."
(let ((from-plus-indent (point)) (let ((from-plus-indent (point))
(oneleft nil)) (oneleft nil))
(beginning-of-line)
;; We used to round up to whole line, but that prevents us from ;; We used to round up to whole line, but that prevents us from
;; correctly handling filling of mixed code-and-comment where we ;; correctly handling filling of mixed code-and-comment where we do want
;; do want to fill the comment but not the code. ;; to fill the comment but not the code. So only use (point) if it's
;; (beginning-of-line) (setq from (point)) ;; 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. ;; Delete all but one soft newline at end of region.
;; And leave TO before that one. ;; And leave TO before that one.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment