From: Joost Kremers <joostkremers@fastmail.fm>
To: Christopher Dimech <dimech@gmx.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: outline-regexp) using ";; *+ " for elisp code
Date: Tue, 11 May 2021 12:29:55 +0200 [thread overview]
Message-ID: <87fsytpnj5.fsf@fastmail.fm> (raw)
In-Reply-To: <trinity-8b0f5f1f-e9a8-4aa5-b74f-ad1c8da04918-1620722882022@3c-app-mailcom-bs03>
On Tue, May 11 2021, Christopher Dimech wrote:
> defvar-local is buffer-local variable. I would think that I could use defvar
> as the setting rather than a buffer-local variable, as the value would be the
> same for all elisp files.
=defvar= and =defvar-local= define global variables. The difference is that
variables defined with =defvar-local= become buffer-local whenever they are set
(with =setq=). But the value set with the =defvar-local= expression itself is
the default value, which is the value that applies in buffers that do not have
their own local value for said variable. (You can set a default value explicitly
with =setq-default=.)
--
Joost Kremers
Life has its moments
next prev parent reply other threads:[~2021-05-11 10:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 3:11 outline-regexp) using ";; *+ " for elisp code Christopher Dimech
2021-05-11 7:05 ` Joost Kremers
2021-05-11 7:11 ` Christopher Dimech
2021-05-11 7:16 ` Christopher Dimech
2021-05-11 7:59 ` Christopher Dimech
2021-05-11 8:19 ` Joost Kremers
2021-05-11 8:32 ` Christopher Dimech
2021-05-11 8:48 ` Christopher Dimech
2021-05-11 10:29 ` Joost Kremers [this message]
2021-05-11 11:22 ` Christopher Dimech
2021-05-11 14:15 ` Jean Louis
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fsytpnj5.fsf@fastmail.fm \
--to=joostkremers@fastmail.fm \
--cc=dimech@gmx.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.
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).