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: Lars Ingebrigtsen
Subject: bug#15117: 24.3.50; doc of `(forward|backward)-*': state return value
Date: Fri, 07 Feb 2014 21:08:19 -0800
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> These are motion functions, just like `goto-char' and
> `skip-chars-forward'.  Their doc should specify the return value
> (regardless of whether it is a position, a Boolean, always nil, or
> anything else).
>
> If, for some special (good) reason, code should not rely on the return
> value of some function then this fact should be stated explicitly in
> the doc: "This function is used only for its side effects; the return
> value is undefined."  This is Lisp, not C - return values are the norm,
> not the exception.

No, in Emacs we seldom say that.  Functions used for side effect are
quite normal.

> The doc of `(forward|backward)-(word|line)' already correctly specifies
> the return value.  Not so for other `(forward|backward)-*' functions,
> such as `(forward|backward)-sexp'.

They don't seem to return anything useful.  Closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





reply via email to

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