[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7835: 24.0.50; doc string of `overlay-put' needs to mention the retu
From: |
Lars Magne Ingebrigtsen |
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 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
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/