From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 7835@debbugs.gnu.org
Subject: bug#7835: 24.0.50; doc string of `overlay-put' needs to mention the return value
Date: Tue, 05 Jul 2011 21:08:16 +0200 [thread overview]
Message-ID: <m3liwcv93z.fsf@quimbies.gnus.org> (raw)
In-Reply-To: <jwv7h7w364m.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 05 Jul 2011 15:00:31 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>>> Like the Elisp manual, the doc string of `overlay-put' needs to mention
>>>>> that it returns its 3rd arg.
>>> Actually, the right fix would be to not document it.
>> Knowing that you're able to say
>> (push (overlay-put ... ... (get-some-value)) list)
>> sounds useful to me.
>
> Looks like bad style to me.
I don't think so. It's how setf and most mutators in Common Lisp
work, for instance:
MAINT> (setq table (make-hash-table))
#<EQL Hash Table{0} 402000AD6B>
MAINT> (setf (gethash :bar table) :foo)
:FOO
Or elisp put:
(put 'put 'foo 'bar)
=> bar
Now, you may consider `overlay-put' more like `insert', and not like a
`setf'-like mutator, but to me I'd be surprised if it didn't act like
these other mutators.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
next prev parent reply other threads:[~2011-07-05 19:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 22:45 bug#7835: 24.0.50; doc string of `overlay-put' needs to mention the return value Drew Adams
2011-07-04 15:32 ` Lars Magne Ingebrigtsen
2011-07-04 18:19 ` Stefan Monnier
2011-07-05 13:29 ` Lars Magne Ingebrigtsen
2011-07-05 19:00 ` Stefan Monnier
2011-07-05 19:08 ` Lars Magne Ingebrigtsen [this message]
2011-07-06 4:03 ` Alp Aker
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3liwcv93z.fsf@quimbies.gnus.org \
--to=larsi@gnus.org \
--cc=7835@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).