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

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sat, 17 Aug 2013 16:01:02 UTC

Severity: minor

Tags: wontfix

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #64 received at 15117 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 15117 <at> debbugs.gnu.org, lekktu <at> gmail.com, larsi <at> gnus.org
Subject: RE: bug#15117: 24.3.50; doc of `(forward|backward)-*': state return
 value
Date: Tue, 11 Feb 2014 09:29:24 -0800 (PST)
> 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.

I would like to see functions that are purely motion functions
return `point', the destination position, unless there is a more
useful return value (as is already the case for a function such as
`forward-comment' or `forward-button').

IOW, some useful value is better than none.  Note: I have nothing
against picking a _more_ useful value than `point'.  Point is just
a default suggestion.  For an example of a more useful value, see
`forward-comment': it sets `point' but returns t or nil.

And document that return value.  Here are some candidates, for a
start (likewise, their backward relatives, and other relatives,
such as `up-list', `down-list', `backward-up-list'...).

forward-char
forward-list ; already returns `point'
forward-page ; returns count
forward-same-syntax
forward-sentence
forward-sexp
forward-symbol
forward-thing
forward-to-indentation
forward-visible-line
forward-whitespace
forward-word

We can look for other motion functions to treat similarly after
this start.  Assuming there is any will to do this.




This bug report was last modified 11 years and 99 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.