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

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

Re: alist-get in Emacs 24?


From: Michael Heerdegen
Subject: Re: alist-get in Emacs 24?
Date: Thu, 08 Oct 2015 10:21:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Marcin Borkowski <mbork@mbork.pl> writes:

> OK, so I did it by hand (though without delq or push).  I am not
> extremely happy with my solution, though, since in the setter function
> I have to pass the alist variable name as a symbol.  (This is needed
> because I might want to use it to introduce a new key-value pair into
> the list.)  Does anyone have any suggestion for enhancing my solution?

First let me say, doing it like that is not bad in any regard.

Second, yes, you could modify the list structure, but this can't be done
if the alist is empty, because the empty (a)list is not a cons.  At least
in this case, your setter would still have to receive a symbol.


Michael.




reply via email to

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