From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Generality of defvar
Date: Fri, 29 Jul 2022 17:56:44 +0200 [thread overview]
Message-ID: <87ilnfrjyb.fsf@dataswamp.org> (raw)
In-Reply-To: CAP_d_8XPm0xyYZ4Yx9SY1Ae724CwFhbz+6iN9wY6rvkuz7O3SQ@mail.gmail.com
Yuri Khan wrote:
>> (defvar var-name)
>> (setq var-name 'var-value)
>>
>> instead because if you do something with that and want to
>> reset it, it's enough to evaluate the second line, whereas
>> if you just have the first line you tend to evaluate that
>> one and if/because the variable is already set at that
>> point then nothing will happen ...
>
> Yes, but you can press C-M-x on a (defvar var-name
> 'var-value) and it will get re-set to the new value even if
> the variable is already defined.
So you can! I just tested and you are right. Did they change
that recently? Okay then, I guess there is no point in doing
(defvar var-name)
(setq var-name 'var-value)
anymore.
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2022-07-29 15:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 20:35 Generality of defvar carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-26 23:01 ` Philip Kaludercic
[not found] ` <87r127h40s.fsf@posteo.net-N7wjq17--3-2>
2022-07-26 23:10 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-27 7:29 ` Thibaut Verron
[not found] ` <CAFsi02SEVCEjGNoQ6vPZvMw7d5F39JZAAPCR5VOUnzQDUERkQA@mail.gmail.com-N7yZ2U2----2>
2022-07-27 12:18 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-27 12:34 ` Emanuel Berg
2022-07-27 12:52 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-27 13:21 ` Thibaut Verron
2022-07-27 13:24 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-27 13:47 ` Thibaut Verron
2022-07-27 16:29 ` Christopher Dimech
2022-07-27 16:39 ` Thibaut Verron
2022-07-28 6:42 ` Christopher Dimech
2022-07-28 7:06 ` Thibaut Verron
2022-07-28 7:34 ` Christopher Dimech
2022-07-28 9:37 ` thibaut.verron
2022-07-28 13:57 ` Christopher Dimech
2022-07-26 23:16 ` Emanuel Berg
2022-07-26 23:23 ` Emanuel Berg
2022-07-26 23:36 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-27 4:57 ` Yuri Khan
2022-07-27 6:59 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-29 15:56 ` Emanuel Berg [this message]
2022-07-29 16:25 ` [External] : " Drew Adams
2022-07-30 3:56 ` Emanuel Berg
2022-07-30 19:36 ` Drew Adams
2022-08-01 3:24 ` 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=87ilnfrjyb.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--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.