emacs-devel
[Top][All Lists]
Advanced

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

Re: default-toplevel-value and set-default-toplevel-value


From: Stefan Monnier
Subject: Re: default-toplevel-value and set-default-toplevel-value
Date: Mon, 12 Dec 2016 11:57:09 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> These functions were evidently introduced in Emacs 24.4, but they are
> not documented, neither in NEWS nor in the ELisp manual.  The doc
> strings are minimal, and leave me confused about how these are
> different from default-value and set-default.  Is this just about a
> possible let-binding of a localized variable,

Yes.

> or is there something else involved?

No, that's it.

> And why did the commit that added these functions also made changes in
> Custom functions?

Because this was introduced to make defvar (and defcustom) operate on
the default-toplevel-value rather than on the default-value, to avoid
problems when loading, from within a let-binding of foo-bar, a file `foo`
which defines foo-bar.  E.g. this happens when `foo-operate` is
autoloaded in code like:

   (let ((foo-bar t))
     (foo-operate ...))


-- Stefan



reply via email to

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