emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] emacs-26 4ab4551: Firm up documentation of generalized


From: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-26 4ab4551: Firm up documentation of generalized variables
Date: Thu, 22 Mar 2018 17:03:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>     The following Lisp forms are the forms in Emacs that will work as
>     generalized variables, and so may appear in the @var{place} argument
>     of @code{setf}:
>
> I take it this isn't quite accurate.  How is it inaccurate?

While it doesn't say so explicitly it gives the impression of
being exhaustive.  I'm not sure it's a big deal, tho, since the rest of
the doc explains how to add more forms, hence clarifies the fact that
it's indeed not exhaustive.

> Is it (i) because there are more GVs in the cl-*.el files?  Or (ii)
> because users can create their own GVs?  Or (iii) <something else>?

I guess a mix of the two (e.g. cl-defstruct creates more, and some of
the preloaded files use cl-defstruct, so even the core predefines more
places than the ones listed).

Similarly, accessors defined using `defmacro` (e.g. (defmacro
mything-secondfield (x) `(cadr ,x))) will also work as places, which
makes yet more places available.

> It would be nice to fix this.  What do you think?

I have the impression it's going to be difficult to keep this list
exhaustive, so we might just add a "catch all" case which refers to
a vague notion of "accessor" maybe.

Or maybe just leave it as is.


        Stefan



reply via email to

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