From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: How to iterate over properties in a plist? Date: Sat, 1 Aug 2015 01:42:09 +0300 Message-ID: <55BBF9C1.6060403@yandex.ru> References: <876150vwaa.fsf@mbork.pl> <874mkkvu40.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1438382554 27073 80.91.229.3 (31 Jul 2015 22:42:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2015 22:42:34 +0000 (UTC) To: Marcin Borkowski , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 01 00:42:29 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1ZLJ0V-0003Pn-EF for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Aug 2015 00:42:27 +0200 Original-Received: from localhost ([::1]:46237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLJ0U-0000C2-NM for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Jul 2015 18:42:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56120) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLJ0L-0000Bv-Cy for help-gnu-emacs@gnu.org; Fri, 31 Jul 2015 18:42:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLJ0H-00034X-Ef for help-gnu-emacs@gnu.org; Fri, 31 Jul 2015 18:42:17 -0400 Original-Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:36352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLJ0H-00033U-7Y for help-gnu-emacs@gnu.org; Fri, 31 Jul 2015 18:42:13 -0400 Original-Received: by wicgj17 with SMTP id gj17so35436665wic.1 for ; Fri, 31 Jul 2015 15:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=qzPG9b8cPJOQK3LUn+FUKEtFGOpYMwhfw/4v4cT6v+E=; b=f3Z8DeANJSjLyjIzeenesld1v52cyS3X9AyCzbnGFxr0tXYrZPNTB8nGkWIKDkmi6j Aibv5Ovm1kiGXbbKd6hYhN5Cix91hp7nskBmsYKQ7eiuDB3IWDOQaV+jRlsKecTjTQpz DNMft0RX5dlX+zfeei8OWXo1xA1Awvy2VxWGVx29EVcsLgF0sdX551WSKapDlRl9RKm6 LU/op9iOqm3CfBTVyyhV+GuSiUCVWiIlbXPoRRzxVcJPGYiNnxBL+feMezJdDqHoQXzj vKC+oXoL7AHaVdNbRiSfr2UYR31JD6dEam7mTm1qRcjOpwffFjQHGTiLCBbU76rbBZ91 k3TQ== X-Received: by 10.180.9.75 with SMTP id x11mr10350444wia.80.1438382532591; Fri, 31 Jul 2015 15:42:12 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id jr5sm9340894wjc.14.2015.07.31.15.42.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 15:42:11 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 In-Reply-To: <874mkkvu40.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106174 Archived-At: On 08/01/2015 01:29 AM, Marcin Borkowski wrote: > AFAIK, the "canonical" way to change a key-value pair in an > alist is to push the new one at the beginning. In my case, the list > will grow quickly. (setcdr (assoc value alist) new-value) works pretty well (but you'll probably need to add a not-found check).