emacs-devel
[Top][All Lists]
Advanced

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

Re: forward-paragraph return value


From: Andreas Röhler
Subject: Re: forward-paragraph return value
Date: Tue, 24 Aug 2010 07:43:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6

Am 23.08.2010 22:59, schrieb Andreas Schwab:
Andreas Röhler<address@hidden>  writes:

`forward-paragraph' presently returns "0" if the number of steps given by
ARG is completed. It's code ends with:

     ;; Return the number of steps that could not be done.
     arg))
Which makes it similar to forward-line.

IMHO buffer-position reached is a more useful return value.
Which you can get with (point).  So what's the point?

Andreas.


Having a consistent design meeting expectations.
For example a function designed to move point should return new position.

Then people may write functions taking already the return value.
Thats more nice than writing FORWARD (point).

Presently return values of move functions are not regular. Some return nil or t, some positions IIRC, this
one it's remaining loop variable.

Well, would consider re-write efforts and not suggest that now for skip-char functions.
In case of moves over paragraphs its easily done.

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/






reply via email to

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