help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elisp question: how to walk through a variable like special-display-


From: Klaus Berndl
Subject: Re: elisp question: how to walk through a variable like special-display-buffer-names
Date: 13 Jan 2004 16:30:10 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

On Tue, 13 Jan 2004, Joakim Hove wrote:

>  
>  leo <leo@bella.local> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]