all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuri Khan <yuri.v.khan@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Does defvar-local has same effect as make-variable-buffer-local?
Date: Sun, 16 May 2021 15:52:48 +0700	[thread overview]
Message-ID: <CAP_d_8U5Sme22rNMVJdDQ2q__HwPzwTn28zrPW4ET6w5u7X2CA@mail.gmail.com> (raw)
In-Reply-To: <YKDTHrml2Fsgy9aN@protected.localdomain>

On Sun, 16 May 2021 at 15:32, Jean Louis <bugs@gnu.support> wrote:

> > Why not look at the source?  Then you could be absolutely sure.
>
> Because I read the other sources (not source of definition) I get
> confused, example in simple.el:
>
> (defvar minibuffer-history-isearch-message-overlay)
> (make-variable-buffer-local 'minibuffer-history-isearch-message-overlay)
>
> Then I ask myself why did not author straight write like:
>
> (defvar-local minibuffer-history-isearch-message-overlay)
>
> I ask myself why that, what is the difference... then I need
> assistance in clarification.

Why not look at the history? ;)

    $ git blame subr.el

shows that defvar-local was introduced on May 4, 2012. On the other hand,

    $ git blame simple.el

shows minibuffer-history-isearch-message-overlay was added July 23,
2007. Its author could not have used defvar-local at the time, because
it had not yet been invented.

This leaves us with the question “why didn’t the author of
defvar-local immediately convert all code to use it”, to which a
possible answer is “because he wasn’t sure it makes a big difference”.



  reply	other threads:[~2021-05-16  8:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 20:14 Does defvar-local has same effect as make-variable-buffer-local? Jean Louis
2021-05-15 20:49 ` [External] : " Drew Adams
2021-05-15 21:01   ` Drew Adams
2021-05-15 21:41     ` Jean Louis
2021-05-15 22:16       ` Drew Adams
2021-05-15 22:21         ` Jean Louis
2021-05-16  4:11 ` Eli Zaretskii
2021-05-16  8:09   ` Jean Louis
2021-05-16  8:52     ` Yuri Khan [this message]
2021-05-16 16:53       ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-16  8:55     ` Eli Zaretskii
2021-05-16 11:26       ` 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

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

  git send-email \
    --in-reply-to=CAP_d_8U5Sme22rNMVJdDQ2q__HwPzwTn28zrPW4ET6w5u7X2CA@mail.gmail.com \
    --to=yuri.v.khan@gmail.com \
    --cc=eliz@gnu.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.