From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'. Date: Fri, 22 Jan 2016 09:07:06 +0200 Message-ID: <83twm66qjp.fsf@gnu.org> References: <20160116143238.27391.97533@vcs.savannah.gnu.org> <8737ttx5dm.fsf@web.de> <83oachbgz0.fsf@gnu.org> <87vb6pih39.fsf@web.de> <83h9i9besq.fsf@gnu.org> <87mvs1ieql.fsf@web.de> <83bn8hbcpp.fsf@gnu.org> <87a8o1ics6.fsf@web.de> <838u3lbbe8.fsf@gnu.org> <87vb6osb0o.fsf@web.de> <87h9i86tke.fsf@web.de> <878u3in7ye.fsf@web.de> <83fuxq95jt.fsf@gnu.org> <83d1su94bn.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1453446421 21537 80.91.229.3 (22 Jan 2016 07:07:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jan 2016 07:07:01 +0000 (UTC) Cc: michael_heerdegen@web.de, emacs-devel@gnu.org To: "John Wiegley" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 22 08:07:00 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 1aMVoB-0003FA-S5 for ged-emacs-devel@m.gmane.org; Fri, 22 Jan 2016 08:07:00 +0100 Original-Received: from localhost ([::1]:51073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMVoA-0000S4-Si for ged-emacs-devel@m.gmane.org; Fri, 22 Jan 2016 02:06:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMVo8-0000QF-18 for emacs-devel@gnu.org; Fri, 22 Jan 2016 02:06:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMVo7-0006iQ-0p for emacs-devel@gnu.org; Fri, 22 Jan 2016 02:06:55 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMVo1-0006iB-UM; Fri, 22 Jan 2016 02:06:49 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4818 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aMVo1-0006Bq-67; Fri, 22 Jan 2016 02:06:49 -0500 In-reply-to: (message from John Wiegley on Thu, 21 Jan 2016 16:56:06 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:198555 Archived-At: > From: John Wiegley > Cc: michael_heerdegen@web.de, emacs-devel@gnu.org > Date: Thu, 21 Jan 2016 16:56:06 -0800 > > >>>>> Eli Zaretskii writes: > > >> > (defmacro alist-put (key value place &optional default remove) > >> > (gv-letplace (_ setter) `(alist-get ,key ,place ,default ,remove) > >> > (funcall setter value))) > >> > >> Not without a decent doc string. > > I hear you. For that code above, the comment would be: > > Given an expression -- in this case, `alist-get' applied to the arguments > passed to this macro -- find the `setter' that can "modify in place" the > object returned by that expression, and immediately use it to replace that > object with the value passed by the caller. The doc string should explain the arguments, so that should be added to the text you propose. Thanks.