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: Stefan Monnier
Subject: Re: alist-get in Emacs 24?
Date: Fri, 02 Oct 2015 09:37:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> There was assoc.el in prior Emacsen (and it's still lying around in
> lisp/obsolete).  `aput' is its setter for alists.  Works great, but is
> obsolete.

"Works great" only if your needs are very modest.  E.g. it's
terribly inefficient, and it relies on dynamic scoping.

As for the (gv-define-expander alist-get ...), you could just blindly
copy that definition into your package.  Of course that'll only work for
Emacsen with gv.el.  For older Emacsen, you'll have to use
define-setf-expander, which indeed works a bit differently from
gv-define-expander.  For the very reason that I invented
gv-define-expander, I'd rather not try and come up with the equivalent
define-setf-expander.


        Stefan




reply via email to

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