From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'. Date: Thu, 21 Jan 2016 16:56:06 -0800 Message-ID: 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: John Wiegley NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453424199 29112 80.91.229.3 (22 Jan 2016 00:56:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jan 2016 00:56:39 +0000 (UTC) Cc: michael_heerdegen@web.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 22 01:56:31 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 1aMQ1d-0002Af-Rk for ged-emacs-devel@m.gmane.org; Fri, 22 Jan 2016 01:56:29 +0100 Original-Received: from localhost ([::1]:50221 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMQ1c-0001tp-W4 for ged-emacs-devel@m.gmane.org; Thu, 21 Jan 2016 19:56:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMQ1Q-0001tj-Cs for emacs-devel@gnu.org; Thu, 21 Jan 2016 19:56:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMQ1P-0003Pt-DT for emacs-devel@gnu.org; Thu, 21 Jan 2016 19:56:16 -0500 Original-Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:36604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMQ1L-0003Nt-FI; Thu, 21 Jan 2016 19:56:11 -0500 Original-Received: by mail-pa0-x22a.google.com with SMTP id yy13so31750868pab.3; Thu, 21 Jan 2016 16:56:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:reply-to:mail-followup-to:mime-version:content-type; bh=Hemo/4/82xobtIG9EhD1jjdwpB17OXPDldZeeTxrJXI=; b=UjvadeN5/UTeS8WreUISGcf62EcK3MB1crWypAev7+TLrinGkG5p1pYjp70V+kaC/4 9O/0eWyV34uThOD1KpVkd8qGu8mBLWyatu5Iu+fLkdtRHQyBG96bqU+B1RkBuiHswxW+ WdxtzfFB410Ri0d2nkvejgDFNPKOokoqeqBBtVk1FCe6/9xKDILM0x+DZjoKW9WSevpW Yi/S6+yoxMrLG8WUrM/glHX4a0E3q1XUjc7ARumqKoslvZLb8Cmvvn3o55CqK2LOHkmn P/c9kw1azyxUC3WXSlXxrX+di8SRLqoddRR85p/klBaC/eb5FKt1VTVgi9kIrwkEknD/ 16sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:reply-to:mail-followup-to:mime-version :content-type; bh=Hemo/4/82xobtIG9EhD1jjdwpB17OXPDldZeeTxrJXI=; b=cjYnUzKctJPNx8oeQg+KxA7L0wRvsRwaXhv9mnc4M/OHiaKoNs5aCwMN2b3GK6vD4f C4OHpPzpdMh10n/NN7RDa+QXTnIdutqyZpNQODhBr4xpk4CoZbQXH7Y6Zu1HT4EmZOo/ wAx2s5DZIEQejj7qRidHLQETw7/wOdKb0hC/L8yY3ozp4AHrKcflx15qEmrLx5KoT/rh brnA2HprMFUnZ7yQEMjlf5lISUy/r2hDWgZih/8hkVUqMDCg9mr53hVIq530g8+RQn4d qSsB07BnZ9DUQVNkj9dH8ogmM4Y8AxD0R/aKX7upIfdu6f/5nTRaD/AZU15+9z+GO1Ea LCvA== X-Gm-Message-State: AG10YOSwe0/+ljs5HPmHjlI9AVz394eipem3JPu1akAqn7wgSlcNpcklS7aiH91vcPGOGg== X-Received: by 10.66.164.196 with SMTP id ys4mr333781pab.119.1453424170329; Thu, 21 Jan 2016 16:56:10 -0800 (PST) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id xz6sm5121166pab.42.2016.01.21.16.56.09 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 21 Jan 2016 16:56:09 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id DB3AA1255B6AD; Thu, 21 Jan 2016 16:56:08 -0800 (PST) In-Reply-To: <83d1su94bn.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 21 Jan 2016 20:26:36 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Mail-Followup-To: Eli Zaretskii , michael_heerdegen@web.de, emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::22a 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:198541 Archived-At: >>>>> 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. Syntactical it's unfortunate, given what it's trying to do. `gv-letplace' could use another name... -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2