From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Does defvar-local has same effect as make-variable-buffer-local? Date: Sun, 16 May 2021 15:52:48 +0700 Message-ID: References: <838s4fwc5q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17718"; mail-complaints-to="usenet@ciao.gmane.io" To: Eli Zaretskii , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 16 10:56:36 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1liCZg-0004Xa-4N for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 16 May 2021 10:56:36 +0200 Original-Received: from localhost ([::1]:33550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liCZf-0000w7-6u for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 16 May 2021 04:56:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liCWI-00056w-Nt for help-gnu-emacs@gnu.org; Sun, 16 May 2021 04:53:08 -0400 Original-Received: from mail-ua1-x92e.google.com ([2607:f8b0:4864:20::92e]:37560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1liCWF-0006dP-1B; Sun, 16 May 2021 04:53:06 -0400 Original-Received: by mail-ua1-x92e.google.com with SMTP id z7so1133988uav.4; Sun, 16 May 2021 01:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=soQ1RpNPAteVdNvs99OtPp8WW19yOrC531olESHTpJA=; b=fIWOKK8OnrNSdNXUoICOPLmErO0Jk7ZxEO+8hN8xDrWjWRrB5qu8CV+BKshxiZomZt n8aA9jpub/pyCY3MuE0gt+xcqsC5Eb1mc/82x1aYTRBceIEYzRQ+Bxb8FCpjMZrJG/6S bk4VqkDVdrkV3fsoDj06KSkZxrsyjctjGS2KMhUXlAIHoNiC3Jc38n/zAXND/53OEH3T B+wijeS5MyXG0npo1LsIXJ6C4M7Mp3a49q58Qvl4aUWeQ0X2UDGK17czrsHV6zbDpOhj dw4ljeADSVoScjIoqPN39xbZ1l9BTIyhSLABUxYmvPgZkyr5S0TTI4EPyvKm9PY6PKfs dL3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=soQ1RpNPAteVdNvs99OtPp8WW19yOrC531olESHTpJA=; b=fiDtMMBJ4P0ION7wuiuzKMxY3Qqouu38yRUaL+X95avQc7M2NorAyUuHyvCXhf2/Jn pk7nvAgp4b0Hq41HDFNSo66dSh6wWYDowj0HQTJI/ZmgF0jZHG/LCpuo+DYsfXHeulyr DFtQuIJOmJnCtlm80HIViNCFUb/ni98vvgF4nJvSt1kbrfXUBRrzqEu8BmRGElMaSb/X 7F9xBRFVBWBbF72hkCoVbZl1+q1wZfFN1TuP7E0+3u7q52kQaGtQgGq2JgFwJWzGV9s4 Uwv4Ut92oD/xeTql26L2v5X2BnvvxdGAMFxNbhIJvrksGtI3IET+49Aey514PApoAw5X zVaw== X-Gm-Message-State: AOAM532IfBMBllcCiDvZ9G1zMpc6z5tbW5wgo9qF1uQZ4FBu+ap5RWCz XsFtyBzvxzqjATTxHDmzk+bGwpLJQcokG9NR3d3/+lbr+r8= X-Google-Smtp-Source: ABdhPJxpmyUt6zIgI74DC9SUJA0eBihOdUWaLP9TP8om3khltF+lzywD+LnLgPLgwNSK0D7AKtahFmqtXgO4XTg/Mxo= X-Received: by 2002:a9f:37e2:: with SMTP id q89mr14490926uaq.24.1621155180560; Sun, 16 May 2021 01:53:00 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::92e; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x92e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129830 Archived-At: On Sun, 16 May 2021 at 15:32, Jean Louis 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 =E2=80=9Cwhy didn=E2=80=99t the author of defvar-local immediately convert all code to use it=E2=80=9D, to which a possible answer is =E2=80=9Cbecause he wasn=E2=80=99t sure it makes a big d= ifference=E2=80=9D.