[Top][All Lists]

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

Re: [Emacs-diffs] emacs-25 d7973e8: Document 'default-toplevel-value' an

From: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-25 d7973e8: Document 'default-toplevel-value' and 'set-default-toplevel-value'
Date: Mon, 26 Dec 2016 20:34:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> +  A variable can be let-bound (@pxref{Local Variables}) to a
> +non-default value; in that case, @code{default-value} will return the

Not sure what "non-default" means here, nor why it's needed.

> +value from that binding, not the global value, and @code{set-default}
> +will be prevented from setting the global value.

Not only `set-default` doesn't set the global value, but it will modify
the let binding (the way it's written could be mis-understood to mean
that in those circumstances, `set-default` will just do nothing).

> The following two
> +functions allow to reference the global value even if it's masked by a
> +let-binding.

That looks fine, thank you.

> address@hidden top-level default value
> address@hidden default-toplevel-value symbol
> +This function returns the @dfn{top-level} default value of
> address@hidden, which is its value outside of any let-binding.
> address@hidden defun
> address@hidden set-default-toplevel-value symbol value
> +This function sets the top-level default value of @var{symbol} to the
> +specified @var{value}.  This comes in handy when you want to set the
> +global value of @var{symbol} regardless of whether your code runs in
> +the context of @var{symbol}'s let-binding.
> address@hidden defun

Perfect, thanks.


reply via email to

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