emacs-devel
[Top][All Lists]
Advanced

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

Re: Alinea filling (hanlding of explicit line-breaks) ‏


From: Stefan Monnier
Subject: Re: Alinea filling (hanlding of explicit line-breaks) ‏
Date: Sun, 13 Mar 2011 17:34:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> But it seems that it does not exactly does the job this way: if the
> argument sign is <0 and you are in the middle of a paragraph, then,
> unless the paragraph is at beginning of buffer you are going to the
> character before the 1st one, rather than to the 1st character of
> paragraph.

Actually, IIRC, it only goes to the previous line if that line is empty.

> So, it seems that you are indeed going to and end of paragraph with
> arg > 0, but that with arg < 0, the what happens is more fuzzy.

Yes, indeed.  But I don't think fill.el depends on this detail of
forward-paragraph's behavior.

> Now, I am a bit confused about what should be the correct behaviour of
> the fill-forward-paragraph-function: is that the following:

> - arg < 0: goto beginning of paragraph arg+1, with paragraph 0 = current

> - arg > 0 : goto beginning of paragraph arg-1, with paragraph 0 =
>             current

I can't remember what forward-paragraph does for a 0 argument, but for
positive arguments it goes to "the next Nth paragraph end" and for
negative argument it goes to the next "Nth paragraph start".
And fill.el only calls that function with values +1 and -1.

More specifically, fill.el mostly does something like:

  (fill-region-as-paragraph (progn (forward-paragraph -1) (point))
                            (progn (forward-paragraph 1) (point)))


-- Stefan



reply via email to

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