[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: |
leo |
Subject: |
Re: elisp question: how to walk through a variable like special-display-buffer-names |
Date: |
Wed, 14 Jan 2004 10:58:48 +1100 |
i couldn't find joakim's direct reply post, that's why i answer to klaus'
reply:
"Klaus Berndl" <klaus.berndl@sdm.de> wrote in message
uk73vlvct.fsf@sdm.de">news:uk73vlvct.fsf@sdm.de...
> 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:
>>
> > (dolist (el list)
> > ;; do something with el
> > (let ((buffer (car el))
> > (alist (cdr el)))
> > ;;
> > ;; But then ...
> > ;;
> > ))
ok, i just hoped that there might be a function in emacs for that: emacs has
so many variables which contain lists of lists or regexps...
but thanks for the tip with dolist!
> > I dont understand what you mean with 'contained alist' - but you might
> > need the assoc function.
well, special-display-buffer-names can have the follwoing structure:
'( (name-of-buffer1 (parameter1 . value_a) (parameter2 . value_b) ...)
(name-of-buffer2 (parameter1 . value_c) (parameter2 . value_d) ...)
(name-of-buffer2 (parameter1 . value_e) (parameter2 . value_f) ...)
...)
and i want to pull out e.g. the value for parameter2 for a specific buffer
name, say name-of-buffer2 with a function i feed with the parameter-symbol
and the buffer-name.
cheers, leo