all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 28736@debbugs.gnu.org
Subject: bug#28736: 24.5; doc of `push'
Date: Sat, 7 Oct 2017 19:56:58 -0700 (PDT)	[thread overview]
Message-ID: <53afe0a4-8ce5-45fc-9e18-6bf52018c9b6@default> (raw)

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'





             reply	other threads:[~2017-10-08  2:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-08  2:56 Drew Adams [this message]
2017-10-08  6:04 ` bug#28736: 24.5; doc of `push' Eli Zaretskii
     [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
     [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       ` 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53afe0a4-8ce5-45fc-9e18-6bf52018c9b6@default \
    --to=drew.adams@oracle.com \
    --cc=28736@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.