all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: "'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : The operation of default-value
Date: Thu, 01 Dec 2022 23:35:33 +0000	[thread overview]
Message-ID: <QWPMZwQ3laQ1OxZ_HHEgcpXT5LETzrHZ4UeErnn42u_xYzyRs1EOIv53xcZrItnN-qgkBPP0FC3VDdPeaSMujlfZKHzLzzKLbjx4Fshd5kQ=@protonmail.com> (raw)
In-Reply-To: <SJ0PR10MB54886D71F8F528E54A56EEF4F3149@SJ0PR10MB5488.namprd10.prod.outlook.com>


------- Original Message -------
On Thursday, December 1st, 2022 at 11:16 PM, Drew Adams <drew.adams@oracle.com> wrote:


> > The documentation states that
> > 
> > "This is the value that is seen in buffers that
> > do not have their own values for this variable.
> > The default value is meaningful for variables
> > with local bindings in certain buffers."
> 
> 
> Good to see you are looking at the doc now!
> 
> Did you read the nodes previous to that one,
> in the same chapter (Buffer-Local Variables)?
> I think they answer your questions.
> 
> > When do buffer variables have their own values,
> > and when do they not have them?
> 
> 
> I think node `Creating Buffer-Local' explains this.
> 
> If you don't create/set a buffer-local value in
> buffer A for a variable then its global, "default"
> value applies in buffer A. It's as simple as that.

Meaning that a package can change the buffer-local variable,
with the default-value being different.  Thusly, the variable
used in the buffer is either the default value when the local
value is nil, or the local value when they differ.

Meaning that I cannot rely completely on default-value, because
the local value might be set up differently.

 
> > How can one figure out what has been set or not (whether buffers have
> > variable values or not)?.
> 
> 
> Check whether (buffer-local-value THE-VAR) is the
> same as (default-value THE-VAR).
> 
> Again, this is explained in the node that precedes
> the node you quoted from.
> 
> I suggest starting at the beginning of chapter
> Buffer-Local Variables, and reading from there.



  reply	other threads:[~2022-12-01 23:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 22:47 The operation of default-value Heime
2022-12-01 23:16 ` [External] : " Drew Adams
2022-12-01 23:35   ` Heime [this message]
2022-12-02  2:49     ` Drew Adams
2022-12-02  2:57       ` Emanuel Berg
2022-12-02  3:03         ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='QWPMZwQ3laQ1OxZ_HHEgcpXT5LETzrHZ4UeErnn42u_xYzyRs1EOIv53xcZrItnN-qgkBPP0FC3VDdPeaSMujlfZKHzLzzKLbjx4Fshd5kQ=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.