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: Tue, 19 Jan 2016 10:42:57 -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> Reply-To: John Wiegley NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453229004 354 80.91.229.3 (19 Jan 2016 18:43:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Jan 2016 18:43:24 +0000 (UTC) Cc: Michael Heerdegen , monnier@iro.umontreal.ca, 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:43:17 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 1aLbFL-0001A4-Sa for ged-emacs-devel@m.gmane.org; Tue, 19 Jan 2016 19:43:16 +0100 Original-Received: from localhost ([::1]:38796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLbFL-0007PT-6X for ged-emacs-devel@m.gmane.org; Tue, 19 Jan 2016 13:43:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLbFG-0007MH-Dl for emacs-devel@gnu.org; Tue, 19 Jan 2016 13:43:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLbFF-0001Sz-K5 for emacs-devel@gnu.org; Tue, 19 Jan 2016 13:43:10 -0500 Original-Received: from mail-pf0-x231.google.com ([2607:f8b0:400e:c00::231]:34132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLbFB-0001Qp-SG; Tue, 19 Jan 2016 13:43:05 -0500 Original-Received: by mail-pf0-x231.google.com with SMTP id q63so185013566pfb.1; Tue, 19 Jan 2016 10:43:05 -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=H9Qij940eCKHGi7XRyNwGaeNDsjVfFUP3PndjE19xdA=; b=DsPzYoUAh6EdLucCOYTJ1zgzHygPCxgGqLDI/L7qXzb3lvqX42Uj/ag2GxaCd4EdaL J9oEAQ+D3b5mqzFKp56fsWfMdjVAdDsnA9ld35t3gGKZy6x96tiQ2w3d0W0NGimbmZf9 UHDK0z/+eZ5ubzXAhk1K+gC9neW6CLPsa9+aWMNPClJrhFQWf27gBKF0VFUJAGn8i5tg +2M3wLx2AxeFKVpTFPr2bEsMAx7qHU2wjXcCMPjIncuFZwiD7j6m5IsrvuGZYqCnCZ1F smtC9+VnZ8VmR807feVemV+RuJv32lcda0zNQNRZitgeWcdWBZ+VxNjEnc1863NexcHm 48bg== 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=H9Qij940eCKHGi7XRyNwGaeNDsjVfFUP3PndjE19xdA=; b=N+0mT5qGwp65PjqplwAg2TyilBvxeOiHkGel2PsB0ADBP4LTw0F+VmHQU7HlupDQM+ vMJmXrKompQ25tIy8Uj8euHvakttuYZejnIrf05J08lBErKP6faSXQuJgMvy9dEg58iy dGrbGaFRzGujMPpqOT/ORXDtgkKa0GztTE308usLpO6KNpYem1OUquwq5nS2G4snwh3p HJ++7H0FoVYMkxfZ2oRJhXYl2lYJS+OVI6xdMOhJGy5Jo4bUETMs8RV9lsFAW6jlYTBX 9Mg5Zrj6RV2ON6srsb/pGgu6P0ryd9HA3gMyiC/31RkQvtSPWvsCy0Y84w+XWdAGOUhO 5tDw== X-Gm-Message-State: ALoCoQm9BShmezaifYr8hdORUIdLbxRfyca/zCqez56Vd7eo4HeCNH48Hc8HJ5zsNSz+MNG8tzQrJEmW5SZzw4mIPqkZvwzrpg== X-Received: by 10.98.80.79 with SMTP id e76mr46452430pfb.126.1453228985150; Tue, 19 Jan 2016 10:43:05 -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 qz9sm43435626pab.39.2016.01.19.10.43.04 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 19 Jan 2016 10:43:04 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id D7F7B124F8568; Tue, 19 Jan 2016 10:43:03 -0800 (PST) In-Reply-To: <83h9i9besq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Jan 2016 20:32:53 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Mail-Followup-To: Eli Zaretskii , Michael Heerdegen , monnier@iro.umontreal.ca, 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:c00::231 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:198379 Archived-At: >>>>> Eli Zaretskii writes: > Isn't 'cdr' also in that class? As well as at least a few others? We have setcdr. > AFAIU, this function just saves you from the need to repeatedly test the > value returned by assq before using it, that's all. The old way: GET: (cdr (assq key my-alist)) SET: (setcdr (assq key my-alist) new-value) The new hotness: GET: (alist-get key my-alist) SET: (setf (alist-get key my-alist) new-value) So... not actually a whole lot of difference. I'm not sure if this is exciting enough to need advertisement in a docstring. But in the elisp manual, sure. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2