From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Klaus Berndl Newsgroups: gmane.emacs.help Subject: Re: elisp question: how to walk through a variable like special-display-buffer-names Date: 13 Jan 2004 16:30:10 +0100 Organization: "sd&m AG, Muenchen, Germany" Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <4y7jzv6g52.fsf@skjellgran.ii.uib.no> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074021707 6756 80.91.224.253 (13 Jan 2004 19:21:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Jan 2004 19:21:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 13 20:21:44 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AgU6h-0004PR-00 for ; Tue, 13 Jan 2004 20:21:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AgQlg-0005KQ-Q4 for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jan 2004 10:47:48 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!logbridge.uoregon.edu!news2.telebyte.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!fi.sn.net!newsfeed2.fi.sn.net!newsfeed.kabelfoon.nl!195.129.110.21.MISMATCH!bnewsfeed00.bru.ops.eu.uu.net!bnewsinpeer01.bru.ops.eu.uu.net!lnewsinpeer01.lnd.ops.eu.uu.net!emea.uu.net!news.sdm.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-NNTP-Posting-Host: sachrang.muc.sdm.de Original-X-Trace: news.sdm.de 1074007810 419 193.102.182.54 (13 Jan 2004 15:30:10 GMT) Original-X-Complaints-To: usenet@news.sdm.de Original-NNTP-Posting-Date: Tue, 13 Jan 2004 15:30:10 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:120043 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:15999 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15999 On Tue, 13 Jan 2004, Joakim Hove wrote: > > leo writes: > > >i want to walk through the list in special-display-buffer-names (and > >special-display-regexps), in order to find out if the left parameter is > >set in the contained alist. > > Well, > > I personally like (dolist) a lot: > > (require 'cl) With current GNU Emacs 21 you do not need require 'cl because `dolist' and `dotimes' are now builtin functions of Emacs. Another way is using `mapc' which walks through a list too. Do not know which one is preferable - maybe some Lisp-Gurus can answer this... Klaus > (dolist (el list) > ;; do something with el > (let ((buffer (car el)) > (alist (cdr el))) > ;; > ;; But then ... > ;; > )) > > I dont understand what you mean with 'contained alist' - but you might > need the assoc function. > > > HTH - Joakim -- Klaus Berndl mailto: klaus.berndl@sdm.de sd&m AG http://www.sdm.de software design & management Carl-Wery-Str. 42, 81739 Muenchen, Germany Tel +49 89 63812-392, Fax -220