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

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

Re: Two questions about generalized variables


From: Michael Heerdegen
Subject: Re: Two questions about generalized variables
Date: Tue, 23 Feb 2016 14:28:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux)

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> > Oh, I see.  Hmm, one could define a place expander quite similarly to
> > the one of `alist-get', I think, but it doesn't seem one to be
> > predefined, indeed.
>
> Right, that was my question, I guess -- I would do this with
> `gv-define-setter', right? Its docstring is a bit impenetrable, but if
> that's the right place to start I can figure it out.

I think even `gv-define-simple-setter' should be sufficient.


> Last question: How do I actually see the gv-expander of `alist-get'?
> Where is that?

Look into gv.el and search for `alist-get'.

That expander definition produces more efficient code than a separate
setter definition would - but one has to learn a bit about the concept
behind the library to understand how that works.


Regards,

Michael.




reply via email to

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