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

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

bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value


From: Eli Zaretskii
Subject: bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value
Date: Tue, 11 Feb 2014 18:31:50 +0200

> Date: Mon, 10 Feb 2014 22:43:08 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 15117@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
> 
> > > Motion functions are not what is typically meant by a
> > > side-effect function.
> 
> In Emacs, in the sense of modifying buffer contents.  That was
> what I meant.  No, I was not clear enough.  But it doesn't really
> matter.  That is anyway *not* a criterion I use for whether a Lisp
> function should have a defined and documented return value.
> 
> My criterion for that is just whether such a value is useful and
> can be counted on.  If so, then I say we should let users know that
> they can count on it.  Simple as that.
> 
> > Why not? Functions intended to move the point are as prototypically
> > side-effect functions as you can get. That goto-char returns
> > POSITION is a moderately useful, but not-at-all necessary commodity.
> > goto-char moving the point as a side effect is its whole raison d'être.
> 
> Agreed; it is.  And the resulting position is thus an important part
> of its effect.  And it is handy to use that value directly.  It always
> has been.  There is nothing special about this.  And nothing special
> about `goto-char' or `skip-chars-forward' vs `forward-char'.  That's
> the point.

With all due respect to the philosophical argument raging through this
thread, it has nothing at all to do with the original bug report.

If you (Drew) want that something productive comes out of this, please
point out specific forward/backward-* functions that return
non-trivial values, and those values are not documented.  The only 2
functions mentioned since the beginning of this discussion are
forward/backward-sexp, which always return nil, a.k.a. "nothing".  I
also tried a couple of other random functions, and they seem all to be
of this "nothing" kind.  So I wonder whether we have any real problem
here.





reply via email to

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