From: Marcin Borkowski <mbork@mbork.pl>
To: Drew Adams <drew.adams@oracle.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>,
Emanuel Berg <moasenwood@zoho.eu>
Subject: Re: [External] : Re: Is there a way of setting a variable only when it exists?
Date: Wed, 16 Mar 2022 19:32:35 +0100 [thread overview]
Message-ID: <87y219u4sc.fsf@mbork.pl> (raw)
In-Reply-To: <SJ0PR10MB5488396D40AE9345B6F5121CF3109@SJ0PR10MB5488.namprd10.prod.outlook.com>
On 2022-03-15, at 16:38, Drew Adams <drew.adams@oracle.com> wrote:
>> What if it's an internal Emacs variable which might become a user
>> option one day (I submitted a bug report about it) and then my
>> customization silently disappears? It's the "silently" part I
>> want to guard against...
>
> What do you mean by "an internal Emacs variable"?
As I hinted in my question, one whose name contains a double dash.
> If it's a defvar then Emacs's predefined defvar
> has no effect if you defvar the variable before
> Emacs does. And it has no effect if you setq
> the var before or after Emacs defvars it (as long
> as Emacs doesn't _use_ it before you setq it).
I know that.
> If Emacs later changes it to a defcustom, the
> same things apply. However, if the defcustom has
> a :set function then your own setting of it might
> no longer be appropriate ("valid").
If, however, it gets promoted to a user option - and gets renamed -
things look different.
Best,
--
Marcin Borkowski
http://mbork.pl
next prev parent reply other threads:[~2022-03-16 18:32 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 6:00 Is there a way of setting a variable only when it exists? Marcin Borkowski
2022-03-14 12:52 ` Eli Zaretskii
2022-03-14 13:16 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-03-14 13:48 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-15 6:17 ` Marcin Borkowski
2022-03-15 6:50 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-15 6:58 ` Jean Louis
2022-03-15 7:45 ` Marcin Borkowski
2022-03-15 8:12 ` Jean Louis
2022-03-15 7:49 ` tomas
2022-03-15 8:13 ` Jean Louis
2022-03-15 8:36 ` tomas
2022-03-15 9:28 ` Jean Louis
2022-03-15 10:01 ` tomas
2022-03-15 11:29 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-15 8:14 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-15 15:33 ` [External] : " Drew Adams
2022-03-15 15:38 ` Drew Adams
2022-03-16 18:32 ` Marcin Borkowski [this message]
2022-03-16 0:47 ` Michael Heerdegen
2022-03-16 18:33 ` Marcin Borkowski
2022-03-16 6:02 ` Tomas Nordin
2022-03-16 6:37 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-16 18:34 ` Marcin Borkowski
2022-03-15 6:48 ` Jean Louis
2022-03-14 22:09 ` Michael Heerdegen
2022-03-15 6:16 ` Marcin Borkowski
2022-03-15 7:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-16 0:25 ` Michael Heerdegen
2022-03-16 18:33 ` Marcin Borkowski
2022-03-16 19:25 ` Michael Heerdegen
2022-03-18 5:58 ` Marcin Borkowski
2022-03-16 20:35 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-17 20:47 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-03-18 5:59 ` Marcin Borkowski
2022-03-18 17:59 ` Jean Louis
2022-03-19 9:25 ` Emanuel Berg via Users list for the GNU Emacs text editor
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=87y219u4sc.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/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.