emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auto-fill-mode and filling paragraphs differ


From: Richard Stallman
Subject: Re: auto-fill-mode and filling paragraphs differ
Date: Fri, 02 Apr 2004 01:01:12 -0500

    I would interpret this as the last permissable column of content.
    According to C-x =, column 70 is the column _after_ fsafd.  If we now
    say "ok, at this column, the end of line is legal", it would appear
    that auto-fill-mode wraps one column too early.  I think that typing a
    space immediately at the end of line should _not_ wrap the preceding
    word to the next line, but merely replace the typed space (instead of
    the last space before that) with a newline.

I agree with you.  Does this patch give correct results?



*** fill.el.~1.170.~    Fri Mar 26 12:04:37 2004
--- fill.el     Thu Apr  1 23:12:54 2004
***************
*** 353,359 ****
       ;; Don't split a line if the rest would look like a new paragraph.
       (unless use-hard-newlines
         (save-excursion
!        (skip-chars-forward " \t") (looking-at paragraph-start)))
       (run-hook-with-args-until-success 'fill-nobreak-predicate)))))
  
  ;; Put `fill-find-break-point-function' property to charsets which
--- 353,364 ----
       ;; Don't split a line if the rest would look like a new paragraph.
       (unless use-hard-newlines
         (save-excursion
!        (skip-chars-forward " \t")
!        ;; If this break point is at the end of the line,
!        ;; which can occur for auto-fill, don't consider the newline
!        ;; which follows as a reason to return t.
!        (and (not (eolp))
!             (looking-at paragraph-start))))
       (run-hook-with-args-until-success 'fill-nobreak-predicate)))))
  
  ;; Put `fill-find-break-point-function' property to charsets which




reply via email to

[Prev in Thread] Current Thread [Next in Thread]