emacs-devel
[Top][All Lists]
Advanced

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

Re: Towards a cleaner build: other output


From: Stefan Monnier
Subject: Re: Towards a cleaner build: other output
Date: Thu, 20 Jun 2019 14:55:38 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>>>> (put '* 'variable-documentation "Most recent value evaluated in IELM.")
>>> Oh, nice.  I'll put that in.
>> In `master` you can even use `internal--define-uninitialized-variable`,
>> which does all that `defvar` and `defconst` do except for setting the
>> actual variable.  And autoload.el won't recognize it as a definition.
>
> Hm...  But is using `internal--define-uninitialized-variable' perhaps
> more obscure than using (defvar sym) (put sym)?  If that's something
> that can be used "non-internally", perhaps it should have a different
> name?

It's a brand new function, introduced to fix several corner case
problems in `defcustom`.  Maybe it should be less "internal", indeed, but
I don't know yet.

FWIW, the differences with defvar+put that I can see are:
1- the docstring is purecopied if applicable (it's not applicable here).
2- the var is globally declared as dynamically-scoped (rather than only
   in the current file).
3- the variable is added to `load-history`.

I'm not sure whether (2) and (3) are advantages or disadvantages in the
present case.


        Stefan




reply via email to

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