unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] emacs-25 d7973e8: Document 'default-toplevel-value' and 'set-default-toplevel-value'
       [not found] ` <20161226171155.3FCBE2201C7@vcs.savannah.gnu.org>
@ 2016-12-27  1:34   ` Stefan Monnier
  2016-12-27  7:11     ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2016-12-27  1:34 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii

> +  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.

> +@cindex top-level default value
> +@defun default-toplevel-value symbol
> +This function returns the @dfn{top-level} default value of
> +@var{symbol}, which is its value outside of any let-binding.
> +@end defun
[...]
> +@defun 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.
> +@end defun

Perfect, thanks.


        Stefan



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Emacs-diffs] emacs-25 d7973e8: Document 'default-toplevel-value' and 'set-default-toplevel-value'
  2016-12-27  1:34   ` [Emacs-diffs] emacs-25 d7973e8: Document 'default-toplevel-value' and 'set-default-toplevel-value' Stefan Monnier
@ 2016-12-27  7:11     ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2016-12-27  7:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Mon, 26 Dec 2016 20:34:40 -0500
> 
> > +  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).

Thanks for the review, I fixed the text there.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-27  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20161226171154.28694.54038@vcs.savannah.gnu.org>
     [not found] ` <20161226171155.3FCBE2201C7@vcs.savannah.gnu.org>
2016-12-27  1:34   ` [Emacs-diffs] emacs-25 d7973e8: Document 'default-toplevel-value' and 'set-default-toplevel-value' Stefan Monnier
2016-12-27  7:11     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).