all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
[parent not found: <<<<53afe0a4-8ce5-45fc-9e18-6bf52018c9b6@default>]
[parent not found: <<53afe0a4-8ce5-45fc-9e18-6bf52018c9b6@default>]
* bug#28736: 24.5; doc of `push'
@ 2017-10-08  2:56 Drew Adams
  2017-10-08  6:04 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2017-10-08  2:56 UTC (permalink / raw)
  To: 28736

Both the doc string and the Elisp manual entry should say that `push'
returns the new value of the place that it updates.  The doc says
nothing about the return value.

The return value is implied by the doc, which says that `push' is
"morally equivalent" to (setf PLACE (cons NEWELT PLACE)), and one
Can figure out that `setf' returns the new value.  But the doc should
just say explicitly what the return value is, instead of making users
dig it out or check the code.

  This is morally equivalent to (setf PLACE (cons NEWELT PLACE)),
  except that PLACE is only evaluated once (after NEWELT).

Also, the use of "morally equivalent" here, though perhaps intended to
be cute, as a joke of sorts, is inappropriate and possibly confusing.
What matters is that the behavior and return value are equivalent, with
the proviso mentioned: that PLACE is evaluated only once (after NEWELT).


In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-09-25 16:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <<<53afe0a4-8ce5-45fc-9e18-6bf52018c9b6@default>
     [not found] ` <<<83h8vatbtk.fsf@gnu.org>
     [not found]   ` <<09655ed0-be2c-4453-9755-224ec733e221@default>
     [not found]     ` <<83wp45sgrm.fsf@gnu.org>
2017-10-08 17:48       ` bug#28736: 24.5; doc of `push' Drew Adams
2017-10-08 18:13         ` Eli Zaretskii
2021-09-25 15:41           ` Stefan Kangas
2021-09-25 16:43             ` bug#28736: [External] : " Drew Adams
     [not found] <<<<53afe0a4-8ce5-45fc-9e18-6bf52018c9b6@default>
     [not found] ` <<<<83h8vatbtk.fsf@gnu.org>
     [not found]   ` <<<09655ed0-be2c-4453-9755-224ec733e221@default>
     [not found]     ` <<<83wp45sgrm.fsf@gnu.org>
     [not found]       ` <<9d23e7ad-ff25-4dac-b598-6614b272bebc@default>
     [not found]         ` <<83tvz9se2s.fsf@gnu.org>
2017-10-08 19:40           ` Drew Adams
2017-10-09  7:13             ` Andreas Röhler
     [not found] <<53afe0a4-8ce5-45fc-9e18-6bf52018c9b6@default>
     [not found] ` <<83h8vatbtk.fsf@gnu.org>
2017-10-08 16:50   ` Drew Adams
2017-10-08 17:15     ` Eli Zaretskii
2017-10-08  2:56 Drew Adams
2017-10-08  6:04 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.