From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'. Date: Tue, 19 Jan 2016 19:01:30 +0100 Message-ID: <87vb6pih39.fsf@web.de> References: <20160116143238.27391.97533@vcs.savannah.gnu.org> <8737ttx5dm.fsf@web.de> <83oachbgz0.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453226544 23767 80.91.229.3 (19 Jan 2016 18:02:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Jan 2016 18:02:24 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 19 19:02:15 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aLabb-0007IZ-Nd for ged-emacs-devel@m.gmane.org; Tue, 19 Jan 2016 19:02:11 +0100 Original-Received: from localhost ([::1]:38655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLabb-0004hx-72 for ged-emacs-devel@m.gmane.org; Tue, 19 Jan 2016 13:02:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLabK-0004g4-AY for emacs-devel@gnu.org; Tue, 19 Jan 2016 13:01:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLabI-0007W4-6z for emacs-devel@gnu.org; Tue, 19 Jan 2016 13:01:53 -0500 Original-Received: from mout.web.de ([212.227.15.4]:60903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLab4-0007OX-81; Tue, 19 Jan 2016 13:01:43 -0500 Original-Received: from drachen.dragon ([92.77.162.209]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0LfAro-1ZofTR1TQ0-00orKk; Tue, 19 Jan 2016 19:01:33 +0100 In-Reply-To: <83oachbgz0.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Jan 2016 19:45:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:VkX6/mp+Js3viwljBzprFD1/aqvmuOiRmA/+0O57EXrQRIYC5ld 8HnrwPOjR1dYpvab4M3M6xGyKkRdkAyilhH8pJj2Mvj35GCu4r8BdxahO4d4ep5CFRmbQo3 o5+hfdR01zEPQeSU1MtvK8imkdssspRr7dF6EOEHCeVqmbsuF3nw/HZxloSWvDECpX628DS 45aXovHMmotZoAT2YTxrw== X-UI-Out-Filterresults: notjunk:1;V01:K0:S3rX/7MT4jc=:OrCNaU2s0yhxCstUtJLhb4 g3BQ1O6HPQdthoE1FpzrEVT6V1XlQ8NXbLT99b4z1QMhoMXM/OiEpz1fd1eXOXYWyY6bJ+XWr 3fzMg5lWGgBg5znKtHyCvf9yptV+AWtUQ7pNbeoCsBoBHVyHi+0+jHX26cntJkhlCCN/rmgzL StjJJL6eg3QphaBXWrq4zRhLJksC0ybOj1cwuHQm9fEKODNrsJJ0VBeRgPcsN/81I1K70Rn4E o/FxxrTfXwSD/MKYaK65qSlFCtU1ml/m1C0sAZqCkVBBOzp3tZKUvjurFXiFgDJgQfbLX/DDK yy2L39Dyh8UHNGM1PN6nbmZYJgcfZM/3Yq4ZEoPPsd3R9HRUYImmHe89iGVzPlbsq9neCEJ4t 8ddJs/4cK8YvDqelZG3V5ytpuOiet+WU+CBxZ3mtWRfl/pzde+mlIMuj6O+qAnyTDbFAbG9ed bGIYEnv6U60DfAaJ6rgqrUGUOvWrhj13IonLQ+6JXBGY2F4/K9ytictO/ExNy8zukegfi991i NiyKa2KC11FTtUPoY7IDEuKzv76lnHR/QBQ11v2Qau3fkLoj/HYcW2phrcxyf6ihXyibZvSO9 56NO3TKBQYkyfyGZ+p8g2UtOaIDxwNrmDM60ZwGj0t/gG/I+kYCTQTutPT2rDxgSTa34XjSah 5krW7J++j6Z1WkY1Vl6Wf3Kr6cl/gcCq2rCNLnJuHnPHB2QvCwvlCU2P43B8JavafNeZYQeGy 4cZGuVUPZdj8Fo7n/Cv93cRs/r+3UsXouMdiYf2P8EpjoUrVPUoN6aSOfI9hTnnZFshbxxtD X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198375 Archived-At: Eli Zaretskii writes: > > From: Michael Heerdegen > > Cc: Eli Zaretskii > > Date: Tue, 19 Jan 2016 10:53:09 +0100 > > > > > +@defun alist-get key value &optional default > > > +This function is like @code{assq}, but instead of returning the > > > entire > > > +association for @var{key}, @code{(@var{key} . @var{value})}, it > > > +returns just the @var{value}. It returns @var{default} if @var{key} > > > +is not found in @var{alist}, defaulting to @code{nil} if > > > @var{default} > > > +is omitted. > > > +@end defun > > > > Should we add that it is also a valid place expression > > ("setf'able")? Or > > to the docstring? That fact doesn't seem to be discoverable at all now. CC'ing Stefan, I think he can clarify. > I don't know -- should we? I didn't find any other function for which > we say something like that, so saw no reason to single this one out. I think setf'ing alist-get is the preferred way now to change the value associated to a key. If it is, it should be discoverable in some way, because it is an important functionality. Unlike other functions that are setf'able, in this case we have no equivalent setter function defined, i think. > In any case, if it's so important to mention that, why doesn't the > function's doc string make a point of doing so? Or maybe I didn't > understand the doc string (do you?). I think the docstring should be improved. AFAICT the REMOVE arg makes only sense when using the function with a gv setter. Michael.