From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: mutate list by appending a list (and similar for props) Date: Mon, 08 Sep 2014 15:29:17 -0400 Organization: A noiseless patient Spider Message-ID: References: <3710b1bf-1e23-4147-b6ea-40c360fb16b4@googlegroups.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1410204633 17896 80.91.229.3 (8 Sep 2014 19:30:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Sep 2014 19:30:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 08 21:30:27 2014 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 1XR4dr-0004Rf-Pf for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Sep 2014 21:30:23 +0200 Original-Received: from localhost ([::1]:45446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XR4dr-0003UI-62 for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Sep 2014 15:30:23 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="24675"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7NHeNELApf1dkOuOiBBlH" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:NoG+QpoImYBuV/vrgdKVDuWlaf4= Original-Xref: usenet.stanford.edu gnu.emacs.help:207426 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:99701 Archived-At: In article <3710b1bf-1e23-4147-b6ea-40c360fb16b4@googlegroups.com>, Sam Halliday wrote: > Hi all, > > I often find that I am repeating calls to add-to-list (mutates) / plist-put > (immutable) in my .emacs [1] configuration against the same variable. I'd > like to be able to pass a list of elements to be appended/prepended to the > variable to save on boilerplate. > > It would be trivial to write a little function that repeats the operation for > a list input, but I'd rather use something that is already in the emacs > distro (or at least in a very lightweight MELPA package). > > Does such a thing exist? The append function does it: (setq list (append additional-list list)) -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***