From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 14:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 36539@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156250886830512 (code B ref -1); Sun, 07 Jul 2019 14:15:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jul 2019 14:14:28 +0000 Received: from localhost ([127.0.0.1]:57251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hk7vu-0007w3-N9 for submit@debbugs.gnu.org; Sun, 07 Jul 2019 10:14:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:40767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hk7vs-0007vu-R2 for submit@debbugs.gnu.org; Sun, 07 Jul 2019 10:14:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46619) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hk7vr-0005YM-7u for bug-gnu-emacs@gnu.org; Sun, 07 Jul 2019 10:14:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hk7vq-00004s-Dv for bug-gnu-emacs@gnu.org; Sun, 07 Jul 2019 10:14:23 -0400 Received: from colin.muc.de ([193.149.48.1]:25096 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1hk7vq-0008U0-3a for bug-gnu-emacs@gnu.org; Sun, 07 Jul 2019 10:14:22 -0400 Received: (qmail 11923 invoked by uid 3782); 7 Jul 2019 14:14:15 -0000 Received: from acm.muc.de (p2E5D59C3.dip0.t-ipconnect.de [46.93.89.195]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 Jul 2019 16:14:14 +0200 Received: (qmail 17626 invoked by uid 1000); 7 Jul 2019 14:14:14 -0000 Date: Sun, 7 Jul 2019 14:14:14 +0000 Message-ID: <20190707141414.GA5641@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Hello, Emacs. Current master branch, emacs -Q: elec-pair.elc has already been loaded at startup. It seems this is not intended - elec-pair.el is not loaded in loadup.el. The reason for this (almost) unconditional loading seems to be a `require' form in the `defined-derive-mode' for emacs-lisp-mode in .../progmodes/elisp-mode.el. This is not good. A decision should be taken as to whether elec-pair.elc should be loaded at start up, and if so, it should be part of the dump. If not, the `require' form in elisp-mode.el should be replaced by an `eval-after-load' form. -- Alan Mackenzie (Nuremberg, Germany). From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.156251864930466 (code B ref 36539); Sun, 07 Jul 2019 16:58:01 +0000 Received: (at 36539) by debbugs.gnu.org; 7 Jul 2019 16:57:29 +0000 Received: from localhost ([127.0.0.1]:57359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkATg-0007vK-J4 for submit@debbugs.gnu.org; Sun, 07 Jul 2019 12:57:28 -0400 Received: from mail-io1-f43.google.com ([209.85.166.43]:40116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkATb-0007us-HL; Sun, 07 Jul 2019 12:57:24 -0400 Received: by mail-io1-f43.google.com with SMTP id h6so21389673iom.7; Sun, 07 Jul 2019 09:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=CTN9JeGxZXaXi4KY6mMYgzXbBYwgnOYHVwYdd23AElc=; b=gUhVd/udcFYt5M8m//3Og+nRcQX3J/gdaa1lj4E4ewKLFNQPNOPl3h6GWpB59PZpAr cMN+DBYhVUsndeOKE+RU6Fq8eyOAJT1rIaCzegiodhBgAFcWy0XhLZatLVHuM0BJTsIO DTA2cYAtXZB4uEMtCOqkOjEId7AveYhDmitRlWONFdsyRH3Cl8pNB/beOxust4mAWisv ddbQxq1tgOKSNs6PhKoy/6R21HNbkoCqtX9T7CZwVxiZsMUW7O7fu0xpiIThbYCGc6FV CH8/KCv7AdfXbbzx+UT8h4WKRApdCeiI2O2Av2Up1rFwPmaFz7K+Yh0VHsy5//eAxv4I MDOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=CTN9JeGxZXaXi4KY6mMYgzXbBYwgnOYHVwYdd23AElc=; b=F5FPki9e41V0IGjL5zJGB3pNm488+b7r8wCbSRfghBsFOp2Q9ii/0+VMbSN6SytlSX 4BpokKIk1yxZThbpcteFEe88qwniJwjghUX/wy+KYcwP8WkzU4zePYs77UTgRZoaeuZm nxK55df0jdNaK2+1inwIIu0hTglhmzwQmv7mHaG+MO5QfHFe9MPGWZcOPPTwVvj3ulcQ n/8TyAK3w39KpCXs1ugSm005KIF0rSncd7cLolmAyTdh2szQOHXz3SkXFI0ny1U5Alxr A1AubUOH3QACMykwCCw4IhdjeGIEd315bm5nLhh1TGhNqFYCpDJDoPPa+nYWbBRMgORL VjBg== X-Gm-Message-State: APjAAAWX7duionjVUgIvgId3wdj1v4Jx6w25ErIBKNFfgZcQ0i3QxQ5V RAP536t+d8PEYL2MzMlnE7UcCgRI X-Google-Smtp-Source: APXvYqwwzBXDQq6mKEZzmvtPCplDh5hL8CJ1pCTZlExcelicoR7IHLAnzlqYA6SxQjoHkTZYZAj3Ig== X-Received: by 2002:a5d:9e49:: with SMTP id i9mr14621247ioi.290.1562518637751; Sun, 07 Jul 2019 09:57:17 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id n2sm5223383ioa.27.2019.07.07.09.57.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 Jul 2019 09:57:17 -0700 (PDT) From: Noam Postavsky References: <20190707141414.GA5641@ACM> Date: Sun, 07 Jul 2019 12:57:16 -0400 In-Reply-To: <20190707141414.GA5641@ACM> (Alan Mackenzie's message of "Sun, 7 Jul 2019 14:14:14 +0000") Message-ID: <87wogt3hqr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 36539 + patch quit Alan Mackenzie writes: > A decision should be taken as to whether elec-pair.elc should be loaded > at start up, and if so, it should be part of the dump. If not, the > `require' form in elisp-mode.el should be replaced by a [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: muc.de] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.43 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (npostavs[at]gmail.com) 1.3 PDS_NO_HELO_DNS High profile HELO but no A record X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --=-=-= Content-Type: text/plain tags 36539 + patch quit Alan Mackenzie writes: > A decision should be taken as to whether elec-pair.elc should be loaded > at start up, and if so, it should be part of the dump. If not, the > `require' form in elisp-mode.el should be replaced by an > `eval-after-load' form. I think it's clear that elec-pair should not be part of the dump, since electric-pair-mode is not turned on by default. Looking at the git log, it seems I added the require to avoid some bootstrapping problems with Bug#24901, but we can move the electric-pair-text-pairs manipulation to a hook instead: --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-Don-t-load-elec-pair-in-elisp-mode-Bug-36539.patch Content-Transfer-Encoding: quoted-printable Content-Description: patch >From cf6057cb5bf6a44d718349776e370b225bc7079f Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 7 Jul 2019 12:22:37 -0400 Subject: [PATCH] Don't load elec-pair in elisp-mode (Bug#36539) * lisp/progmodes/elisp-mode.el (emacs-lisp-set-electric-text-pairs): New function. (emacs-lisp-mode): Add it to electric-pair-mode-hook. --- lisp/progmodes/elisp-mode.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index c86277a309..7c77c34b50 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -233,6 +233,12 @@ emacs-lisp-mode-hook :type 'hook :group 'lisp) =20 +(defun emacs-lisp-set-electric-text-pairs () + (defvar electric-pair-text-pairs) + (setq-local electric-pair-text-pairs + (append '((?\` . ?\') (?=E2=80=98 . ?=E2=80=99)) electric-pa= ir-text-pairs)) + (remove-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pai= rs t)) + ;;;###autoload (define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp" "Major mode for editing Lisp code to run in Emacs. @@ -245,12 +251,8 @@ emacs-lisp-mode (defvar project-vc-external-roots-function) (lisp-mode-variables nil nil 'elisp) (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) - (unless noninteractive - (require 'elec-pair) - (defvar electric-pair-text-pairs) - (setq-local electric-pair-text-pairs - (append '((?\` . ?\') (?=E2=80=98 . ?=E2=80=99)) electric-= pair-text-pairs)) - (setq-local electric-quote-string t)) + (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs = t) + (setq-local electric-quote-string t) (setq imenu-case-fold-search nil) (add-function :before-until (local 'eldoc-documentation-function) #'elisp-eldoc-documentation-function) --=20 2.11.0 --=-=-=-- From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky Cc: 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.156252419014857 (code B ref 36539); Sun, 07 Jul 2019 18:30:02 +0000 Received: (at 36539) by debbugs.gnu.org; 7 Jul 2019 18:29:50 +0000 Received: from localhost ([127.0.0.1]:57394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkBv2-0003rY-Oy for submit@debbugs.gnu.org; Sun, 07 Jul 2019 14:29:50 -0400 Received: from colin.muc.de ([193.149.48.1]:36994 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hkBv0-0003rO-Tf for 36539@debbugs.gnu.org; Sun, 07 Jul 2019 14:29:47 -0400 Received: (qmail 85530 invoked by uid 3782); 7 Jul 2019 18:29:42 -0000 Received: from acm.muc.de (p2E5D59C3.dip0.t-ipconnect.de [46.93.89.195]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 Jul 2019 20:29:41 +0200 Received: (qmail 23246 invoked by uid 1000); 7 Jul 2019 18:29:41 -0000 Date: Sun, 7 Jul 2019 18:29:41 +0000 Message-ID: <20190707182941.GA4053@ACM> References: <20190707141414.GA5641@ACM> <87wogt3hqr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87wogt3hqr.fsf@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Noam. On Sun, Jul 07, 2019 at 12:57:16 -0400, Noam Postavsky wrote: > tags 36539 + patch > quit > Alan Mackenzie writes: > > A decision should be taken as to whether elec-pair.elc should be loaded > > at start up, and if so, it should be part of the dump. If not, the > > `require' form in elisp-mode.el should be replaced by an > > `eval-after-load' form. > I think it's clear that elec-pair should not be part of the dump, since > electric-pair-mode is not turned on by default. Looking at the git log, > it seems I added the require to avoid some bootstrapping problems with > Bug#24901, but we can move the electric-pair-text-pairs manipulation to > a hook instead: Just as a matter of interest, I commented out the pertinent form in emacs-lisp-mode, did a make bootstrap, emacs -Q, and elec-pair.elc was still present in my Emacs. :-( I don't know why, or how, but it is. With your patch (below), have you tested whether or not elec-pair.elc hasn't been loaded on starting Emacs? If it hasn't been loaded, you've found some trick that eludes me. > >>From cf6057cb5bf6a44d718349776e370b225bc7079f Mon Sep 17 00:00:00 2001 > From: Noam Postavsky > Date: Sun, 7 Jul 2019 12:22:37 -0400 > Subject: [PATCH] Don't load elec-pair in elisp-mode (Bug#36539) > > * lisp/progmodes/elisp-mode.el (emacs-lisp-set-electric-text-pairs): > New function. > (emacs-lisp-mode): Add it to electric-pair-mode-hook. > --- > lisp/progmodes/elisp-mode.el | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el > index c86277a309..7c77c34b50 100644 > --- a/lisp/progmodes/elisp-mode.el > +++ b/lisp/progmodes/elisp-mode.el > @@ -233,6 +233,12 @@ emacs-lisp-mode-hook > :type 'hook > :group 'lisp) > > +(defun emacs-lisp-set-electric-text-pairs () > + (defvar electric-pair-text-pairs) > + (setq-local electric-pair-text-pairs > + (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs)) > + (remove-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs t)) > + > ;;;###autoload > (define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp" > "Major mode for editing Lisp code to run in Emacs. > @@ -245,12 +251,8 @@ emacs-lisp-mode > (defvar project-vc-external-roots-function) > (lisp-mode-variables nil nil 'elisp) > (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) > - (unless noninteractive > - (require 'elec-pair) > - (defvar electric-pair-text-pairs) > - (setq-local electric-pair-text-pairs > - (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs)) > - (setq-local electric-quote-string t)) > + (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs t) Shouldn't that be .....-text pairs nil t), to make a local value of the ^^^ hook? The remove-hook (above) seems to be expecting a local value. > + (setq-local electric-quote-string t) > (setq imenu-case-fold-search nil) > (add-function :before-until (local 'eldoc-documentation-function) > #'elisp-eldoc-documentation-function) > -- > 2.11.0 > As a matter of interest, what is that 2.11.0 that I keep seeing at the bottom of patches? -- Alan Mackenzie (Nuremberg, Germany). From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 18:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alan Mackenzie Cc: npostavs@gmail.com, 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.156252514316453 (code B ref 36539); Sun, 07 Jul 2019 18:46:01 +0000 Received: (at 36539) by debbugs.gnu.org; 7 Jul 2019 18:45:43 +0000 Received: from localhost ([127.0.0.1]:57399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkCAQ-0004HJ-JP for submit@debbugs.gnu.org; Sun, 07 Jul 2019 14:45:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkCAP-0004H4-8q for 36539@debbugs.gnu.org; Sun, 07 Jul 2019 14:45:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hkCAJ-0008PN-DL; Sun, 07 Jul 2019 14:45:35 -0400 Received: from [176.228.60.248] (port=3898 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hkCAI-0001BX-O9; Sun, 07 Jul 2019 14:45:35 -0400 Date: Sun, 07 Jul 2019 21:45:28 +0300 Message-Id: <83o9257kfr.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <20190707182941.GA4053@ACM> (message from Alan Mackenzie on Sun, 7 Jul 2019 18:29:41 +0000) References: <20190707141414.GA5641@ACM> <87wogt3hqr.fsf@gmail.com> <20190707182941.GA4053@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 7 Jul 2019 18:29:41 +0000 > From: Alan Mackenzie > Cc: 36539@debbugs.gnu.org > > Just as a matter of interest, I commented out the pertinent form in > emacs-lisp-mode, did a make bootstrap, emacs -Q, and elec-pair.elc was > still present in my Emacs. :-( I cannot reproduce this. After applying Noam's patch and just saying "make", "emacs -Q" doesn't load elec-pair anymore, which I verified both by calling featurep and by running under GDB with a breakpoint in Fload. From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 18:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alan Mackenzie Cc: 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.156252528216704 (code B ref 36539); Sun, 07 Jul 2019 18:49:02 +0000 Received: (at 36539) by debbugs.gnu.org; 7 Jul 2019 18:48:02 +0000 Received: from localhost ([127.0.0.1]:57403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkCCf-0004LA-62 for submit@debbugs.gnu.org; Sun, 07 Jul 2019 14:48:02 -0400 Received: from mail-io1-f51.google.com ([209.85.166.51]:35137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkCCc-0004Kx-M1 for 36539@debbugs.gnu.org; Sun, 07 Jul 2019 14:47:59 -0400 Received: by mail-io1-f51.google.com with SMTP id m24so20559381ioo.2 for <36539@debbugs.gnu.org>; Sun, 07 Jul 2019 11:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Sr7GPqETeMuy+LCjOdruUsQPQkrN9Vyv5SYC1pdkrNc=; b=IT8n5KlVVtqrTEroyb9qiSCseXJZr9gBuc/MV361UfUXbiS72NxsUH2xrBtvCXg9Pd XIHr3My/kFkTpzHpKVWBi1wPVKp8p/kePsEZNnOXb+vbckEXrQriusQ37Y1pE6SYh/0R jnzKh8JobW6eP+fBHVMrOXzd6/8qA1j8VtFfZWN6IJ3DmYH3jbaE+YfNsv8lelGViRyR YIdwRBH7OxSVO3Wu6bxKjC9SPLiIcFANQ1cScNgSNLaf47om2VuRBj+y2gpxSDN0EU6L WUu0mPIxjpwjwG826yJLm4suk6xqkYe7QY033kFMlHn2ybYOXTdf7MXLUJ6swWm88kmo uAlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Sr7GPqETeMuy+LCjOdruUsQPQkrN9Vyv5SYC1pdkrNc=; b=s0uPb/QAGsNZdR0iFT0Xzbo2H0lABECrrV9fRZYNLK2E48at7Cd8h4ie4H11TENhE+ /BlHi9x3Mr1fxMmUwnD1htfX9TXJ0oxX1Pjwc5eQ+bjo+es7k1iXrk0LlD4kSSLJFQJ7 RdGj0oH875EzBPeluKacjzzD9lUhEQXuibzmKDYwQ8OOjjX9ZzpoNkT6ZZ93Oalt69pa eTGVzBzlvZqPY2+i7ccCnXNkxnKyraAaPTUPC8nsA09tjfDvjzMqRdD91Ibfqyj5J5Wo w7UP2pQwCocMuXI67X7RMSkGfPOGZ/Cf0VD16SHptde4xUflRg319n2gOvBsBcnXxJGs 3FVw== X-Gm-Message-State: APjAAAXa17NjtNKAIW43szB+6yyYeAS6mKpBCY8PQgTFOlpzJVeSCKye zsbUfShQ+tpUj+RAcHReY35APS7c X-Google-Smtp-Source: APXvYqy8Pbsedo03UxPDj0WrG77S0j4jQY1ODWcIiACaFmx0hasS0jlr8r11MLrXWKS/MJZfZABxeg== X-Received: by 2002:a5d:8ad0:: with SMTP id e16mr9255243iot.262.1562525272699; Sun, 07 Jul 2019 11:47:52 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id h19sm10993429iol.65.2019.07.07.11.47.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 Jul 2019 11:47:52 -0700 (PDT) From: Noam Postavsky References: <20190707141414.GA5641@ACM> <87wogt3hqr.fsf@gmail.com> <20190707182941.GA4053@ACM> Date: Sun, 07 Jul 2019 14:47:51 -0400 In-Reply-To: <20190707182941.GA4053@ACM> (Alan Mackenzie's message of "Sun, 7 Jul 2019 18:29:41 +0000") Message-ID: <87tvbx3cmg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Alan Mackenzie writes: > Just as a matter of interest, I commented out the pertinent form in > emacs-lisp-mode, did a make bootstrap, emacs -Q, and elec-pair.elc was > still present in my Emacs. :-( > > I don't know why, or [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: muc.de] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (npostavs[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.51 listed in list.dnswl.org] 1.3 PDS_NO_HELO_DNS High profile HELO but no A record X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --=-=-= Content-Type: text/plain Alan Mackenzie writes: > Just as a matter of interest, I commented out the pertinent form in > emacs-lisp-mode, did a make bootstrap, emacs -Q, and elec-pair.elc was > still present in my Emacs. :-( > > I don't know why, or how, but it is. With your patch (below), have you > tested whether or not elec-pair.elc hasn't been loaded on starting > Emacs? If it hasn't been loaded, you've found some trick that eludes > me. How are you checking? M-: (featurep 'elec-pair) RET returns nil for me. Assuming you have help-enable-completion-auto-load set to t (the default), it's pretty easy to load various things just by hitting TAB in response to describe-function or describe-variable. >> + (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs t) > > Shouldn't that be .....-text pairs nil t), to make a local value of the > ^^^ > hook? The remove-hook (above) seems to be expecting a local value. Oops, yes, thanks for catching that. >> + (setq-local electric-quote-string t) >> (setq imenu-case-fold-search nil) >> (add-function :before-until (local 'eldoc-documentation-function) >> #'elisp-eldoc-documentation-function) >> -- >> 2.11.0 >> > > As a matter of interest, what is that 2.11.0 that I keep seeing at the > bottom of patches? Looks like 'git format-patch' adds the git version at the bottom. $ git --version git version 2.11.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=0001-Don-t-load-elec-pair-in-elisp-mode-Bug-36539.patch Content-Transfer-Encoding: quoted-printable Content-Description: updated patch >From c3a99c7260e07692c8d02a9cd9d38f6ef188311c Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 7 Jul 2019 12:22:37 -0400 Subject: [PATCH] Don't load elec-pair in elisp-mode (Bug#36539) * lisp/progmodes/elisp-mode.el (emacs-lisp-set-electric-text-pairs): New function. (emacs-lisp-mode): Add it to electric-pair-mode-hook. --- lisp/progmodes/elisp-mode.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index c86277a309..78a87f2d32 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -233,6 +233,12 @@ emacs-lisp-mode-hook :type 'hook :group 'lisp) =20 +(defun emacs-lisp-set-electric-text-pairs () + (defvar electric-pair-text-pairs) + (setq-local electric-pair-text-pairs + (append '((?\` . ?\') (?=E2=80=98 . ?=E2=80=99)) electric-pa= ir-text-pairs)) + (remove-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pai= rs t)) + ;;;###autoload (define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp" "Major mode for editing Lisp code to run in Emacs. @@ -245,12 +251,8 @@ emacs-lisp-mode (defvar project-vc-external-roots-function) (lisp-mode-variables nil nil 'elisp) (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) - (unless noninteractive - (require 'elec-pair) - (defvar electric-pair-text-pairs) - (setq-local electric-pair-text-pairs - (append '((?\` . ?\') (?=E2=80=98 . ?=E2=80=99)) electric-= pair-text-pairs)) - (setq-local electric-quote-string t)) + (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs = nil t) + (setq-local electric-quote-string t) (setq imenu-case-fold-search nil) (add-function :before-until (local 'eldoc-documentation-function) #'elisp-eldoc-documentation-function) --=20 2.11.0 --=-=-=-- From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 19:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky Cc: 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.156252666218896 (code B ref 36539); Sun, 07 Jul 2019 19:12:02 +0000 Received: (at 36539) by debbugs.gnu.org; 7 Jul 2019 19:11:02 +0000 Received: from localhost ([127.0.0.1]:57409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkCYw-0004uY-0j for submit@debbugs.gnu.org; Sun, 07 Jul 2019 15:11:02 -0400 Received: from colin.muc.de ([193.149.48.1]:30700 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hkCYt-0004uG-Jb for 36539@debbugs.gnu.org; Sun, 07 Jul 2019 15:11:00 -0400 Received: (qmail 99287 invoked by uid 3782); 7 Jul 2019 19:10:53 -0000 Received: from acm.muc.de (p2E5D59C3.dip0.t-ipconnect.de [46.93.89.195]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 Jul 2019 21:10:52 +0200 Received: (qmail 25367 invoked by uid 1000); 7 Jul 2019 19:10:52 -0000 Date: Sun, 7 Jul 2019 19:10:52 +0000 Message-ID: <20190707191052.GB4053@ACM> References: <20190707141414.GA5641@ACM> <87wogt3hqr.fsf@gmail.com> <20190707182941.GA4053@ACM> <87tvbx3cmg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tvbx3cmg.fsf@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again, Noam. On Sun, Jul 07, 2019 at 14:47:51 -0400, Noam Postavsky wrote: > Alan Mackenzie writes: > > Just as a matter of interest, I commented out the pertinent form in > > emacs-lisp-mode, did a make bootstrap, emacs -Q, and elec-pair.elc was > > still present in my Emacs. :-( > > I don't know why, or how, but it is. With your patch (below), have you > > tested whether or not elec-pair.elc hasn't been loaded on starting > > Emacs? If it hasn't been loaded, you've found some trick that eludes > > me. > How are you checking? M-: (featurep 'elec-pair) RET returns nil for me. Yes, it worked for me, too. :-( > Assuming you have help-enable-completion-auto-load set to t (the > default), it's pretty easy to load various things just by hitting TAB in > response to describe-function or describe-variable. That was my problem. I didn't know about help-enable-completion-auto-load (which says it was new in 26.3). I think I will disable this in my .emacs - it seems it will cause me more problems than it will help. I've always used C-h f and C-h v to see an Elisp file's autoloads. Thanks for the tip!. [ .... ] > >> + (setq-local electric-quote-string t) > >> (setq imenu-case-fold-search nil) > >> (add-function :before-until (local 'eldoc-documentation-function) > >> #'elisp-eldoc-documentation-function) > >> -- > >> 2.11.0 > > As a matter of interest, what is that 2.11.0 that I keep seeing at the > > bottom of patches? > Looks like 'git format-patch' adds the git version at the bottom. Ah, so that's it. Thanks! > $ git --version > git version 2.11.0 Thanks for the revised patch. I'll try it. -- Alan Mackenzie (Nuremberg, Germany). From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 19:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: npostavs@gmail.com, 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.156252689919256 (code B ref 36539); Sun, 07 Jul 2019 19:15:02 +0000 Received: (at 36539) by debbugs.gnu.org; 7 Jul 2019 19:14:59 +0000 Received: from localhost ([127.0.0.1]:57413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkCck-00050V-Ph for submit@debbugs.gnu.org; Sun, 07 Jul 2019 15:14:58 -0400 Received: from colin.muc.de ([193.149.48.1]:30732 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hkCcj-00050M-AW for 36539@debbugs.gnu.org; Sun, 07 Jul 2019 15:14:57 -0400 Received: (qmail 1134 invoked by uid 3782); 7 Jul 2019 19:14:56 -0000 Received: from acm.muc.de (p2E5D59C3.dip0.t-ipconnect.de [46.93.89.195]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 Jul 2019 21:14:55 +0200 Received: (qmail 25386 invoked by uid 1000); 7 Jul 2019 19:14:55 -0000 Date: Sun, 7 Jul 2019 19:14:55 +0000 Message-ID: <20190707191455.GC4053@ACM> References: <20190707141414.GA5641@ACM> <87wogt3hqr.fsf@gmail.com> <20190707182941.GA4053@ACM> <83o9257kfr.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83o9257kfr.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. Thanks for the reply. On Sun, Jul 07, 2019 at 21:45:28 +0300, Eli Zaretskii wrote: > > Date: Sun, 7 Jul 2019 18:29:41 +0000 > > From: Alan Mackenzie > > Cc: 36539@debbugs.gnu.org > > Just as a matter of interest, I commented out the pertinent form in > > emacs-lisp-mode, did a make bootstrap, emacs -Q, and elec-pair.elc was > > still present in my Emacs. :-( > I cannot reproduce this. After applying Noam's patch and just saying > "make", "emacs -Q" doesn't load elec-pair anymore, which I verified > both by calling featurep and by running under GDB with a breakpoint in > Fload. As Noam suggested, I was getting caught by help-enable-completion-auto-load being t by default. I tried to check whether elec-pair.el had been loaded with C-h f electric-pair- , which, of course loaded the file before giving me the complete list of functions. So, just pilot error on my part. -- Alan Mackenzie (Nuremberg, Germany). From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2019 19:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alan Mackenzie Cc: npostavs@gmail.com, 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.156252708419611 (code B ref 36539); Sun, 07 Jul 2019 19:19:02 +0000 Received: (at 36539) by debbugs.gnu.org; 7 Jul 2019 19:18:04 +0000 Received: from localhost ([127.0.0.1]:57417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkCfj-00056E-8T for submit@debbugs.gnu.org; Sun, 07 Jul 2019 15:18:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkCfi-00055j-34 for 36539@debbugs.gnu.org; Sun, 07 Jul 2019 15:18:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hkCfc-0003xN-En; Sun, 07 Jul 2019 15:17:56 -0400 Received: from [176.228.60.248] (port=1882 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hkCfY-0000Te-SR; Sun, 07 Jul 2019 15:17:54 -0400 Date: Sun, 07 Jul 2019 22:17:46 +0300 Message-Id: <83muhp7ixx.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <20190707191052.GB4053@ACM> (message from Alan Mackenzie on Sun, 7 Jul 2019 19:10:52 +0000) References: <20190707141414.GA5641@ACM> <87wogt3hqr.fsf@gmail.com> <20190707182941.GA4053@ACM> <87tvbx3cmg.fsf@gmail.com> <20190707191052.GB4053@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 7 Jul 2019 19:10:52 +0000 > From: Alan Mackenzie > Cc: 36539@debbugs.gnu.org > > That was my problem. I didn't know about > help-enable-completion-auto-load (which says it was new in 26.3). I > think I will disable this in my .emacs - it seems it will cause me more > problems than it will help. I've always used C-h f and C-h v to see an > Elisp file's autoloads. Thanks for the tip!. This option allows you to _disable_ auto-loading as side effect of Help commands. Emacs 26.1 and 26.2 also auto-load them, but don't let you disable that. So whatever you were used to do with C-h f was already working against you since Emacs 26.1; 26.3 lets you control that. From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jul 2019 11:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Alan Mackenzie Cc: npostavs@gmail.com, 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.156301889824806 (code B ref 36539); Sat, 13 Jul 2019 11:55:01 +0000 Received: (at 36539) by debbugs.gnu.org; 13 Jul 2019 11:54:58 +0000 Received: from localhost ([127.0.0.1]:41537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmGcD-0006S1-V0 for submit@debbugs.gnu.org; Sat, 13 Jul 2019 07:54:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmGcB-0006Rj-BY for 36539@debbugs.gnu.org; Sat, 13 Jul 2019 07:54:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hmGc5-0005xv-M5; Sat, 13 Jul 2019 07:54:49 -0400 Received: from [176.228.60.248] (port=3687 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hmGc5-0006yn-24; Sat, 13 Jul 2019 07:54:49 -0400 Date: Sat, 13 Jul 2019 14:54:40 +0300 Message-Id: <835zo6175r.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <20190707191052.GB4053@ACM> (message from Alan Mackenzie on Sun, 7 Jul 2019 19:10:52 +0000) References: <20190707141414.GA5641@ACM> <87wogt3hqr.fsf@gmail.com> <20190707182941.GA4053@ACM> <87tvbx3cmg.fsf@gmail.com> <20190707191052.GB4053@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 7 Jul 2019 19:10:52 +0000 > From: Alan Mackenzie > Cc: 36539@debbugs.gnu.org > > > How are you checking? M-: (featurep 'elec-pair) RET returns nil for me. > > Yes, it worked for me, too. :-( > > > Assuming you have help-enable-completion-auto-load set to t (the > > default), it's pretty easy to load various things just by hitting TAB in > > response to describe-function or describe-variable. > > That was my problem. I didn't know about > help-enable-completion-auto-load (which says it was new in 26.3). I > think I will disable this in my .emacs - it seems it will cause me more > problems than it will help. I've always used C-h f and C-h v to see an > Elisp file's autoloads. Thanks for the tip!. > > [ .... ] > > > >> + (setq-local electric-quote-string t) > > >> (setq imenu-case-fold-search nil) > > >> (add-function :before-until (local 'eldoc-documentation-function) > > >> #'elisp-eldoc-documentation-function) > > >> -- > > >> 2.11.0 > > > > As a matter of interest, what is that 2.11.0 that I keep seeing at the > > > bottom of patches? > > > Looks like 'git format-patch' adds the git version at the bottom. > > Ah, so that's it. Thanks! > > > $ git --version > > git version 2.11.0 > > Thanks for the revised patch. I'll try it. Any reasons this is not yet installed on master? From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jul 2019 22:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Alan Mackenzie , 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.15630576922905 (code B ref 36539); Sat, 13 Jul 2019 22:42:02 +0000 Received: (at 36539) by debbugs.gnu.org; 13 Jul 2019 22:41:32 +0000 Received: from localhost ([127.0.0.1]:43552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmQhw-0000kn-3W for submit@debbugs.gnu.org; Sat, 13 Jul 2019 18:41:32 -0400 Received: from mail-io1-f43.google.com ([209.85.166.43]:42992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmQhv-0000kb-00 for 36539@debbugs.gnu.org; Sat, 13 Jul 2019 18:41:31 -0400 Received: by mail-io1-f43.google.com with SMTP id u19so27942775ior.9 for <36539@debbugs.gnu.org>; Sat, 13 Jul 2019 15:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=gNB0WaBI1rXx8OOOI0VINDBfUWqifwaQw3umovtbk54=; b=Y9ldMVLFBzYzaGhFJ0tCZUJzDjV+l1hTfzdyVo97U6izyy0qohdjKcihEcXWuEGHS5 EeALSOGin6YFP/vW4MNLkIowUCiVOS0LGwB+NA4aYyJ93uvAvLzC0WBpMDJuLgbDYqcu s43laGyDUvJ2JO2w8UgMfDwvwP4D/Gzlg3EWEUB5WubkM+TJKhOdp1f5gbopy+9b2ew9 Ltw9Otd0ndFp3CKyvCvqKQtXP7IVtHAaO5Pefb48Itpgd38MR0hdLsNMQEBVuJIaqm4v 48JywhSqRKP8BUSZqvK6aJv6XBa1XH2L69NRlIxb47qbD+nrWrczykjhkZ2AHTkmwjDA xpgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=gNB0WaBI1rXx8OOOI0VINDBfUWqifwaQw3umovtbk54=; b=UV1s1RS4o//bO/bYxGgMi4mAScsFMPCpCd+8fcZH36bf3KaMURrgAZTUWBmyBF1gg/ FJutvrIir9Dsh+KVwb/puITU+gMmBn0992rCIb/LrtuiY6vHj92qsa9Qh/QzQE27nAY4 gNDIbrVHKiHFR5f27tjxDX55DA0quJQs6thCwM8JvUvVzxd16iT9q+CU2tnHK/BYIUJE CKmOOb5EBI5m9pod5yiHhgQtIhFOirTMYQ7L4+c0m1U1seoye3/9tB8MLjIIJvubO/Eg /6b/ZQv3EWSpW/rM9GaOvsEekqmhBWTnLqTgfQehBX5GPpcDU3/Z2RHXK7pCqWSgU6Gy Hk/w== X-Gm-Message-State: APjAAAWQAYUI8h3Cf7GP6U179QdBizndkcUeOMs9ixDE6bhIorXZdAXU nT2Fmay2wgqQen7A1XakpwxQAuEr X-Google-Smtp-Source: APXvYqwUPMNOoAalZ/G9AyQ0a/7Jm3qsjsTpo3CIFkgF1nZTwHoqHMaK/MJT5zvfYx8kLU3guqFpGA== X-Received: by 2002:a5e:9e42:: with SMTP id j2mr18634481ioq.133.1563057685243; Sat, 13 Jul 2019 15:41:25 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id k26sm9817074ios.38.2019.07.13.15.41.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 13 Jul 2019 15:41:24 -0700 (PDT) From: Noam Postavsky References: <20190707141414.GA5641@ACM> <87wogt3hqr.fsf@gmail.com> <20190707182941.GA4053@ACM> <87tvbx3cmg.fsf@gmail.com> <20190707191052.GB4053@ACM> <835zo6175r.fsf@gnu.org> Date: Sat, 13 Jul 2019 18:41:23 -0400 In-Reply-To: <835zo6175r.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 13 Jul 2019 14:54:40 +0300") Message-ID: <87o91x1rsc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > Any reasons this is not yet installed on master? Actually, I noticed a problem with it: electric-pair-mode is a global mode, so using the local value of the hook isn't right. I think the updated patch below is correct. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-Don-t-load-elec-pair-in-elisp-mode-Bug-36539.patch Content-Transfer-Encoding: quoted-printable Content-Description: patch >From ebec942f5734f2ce6916dc14706704dc1a93e62d Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 7 Jul 2019 12:22:37 -0400 Subject: [PATCH] Don't load elec-pair in elisp-mode (Bug#36539) * lisp/progmodes/elisp-mode.el (emacs-lisp-set-electric-text-pairs): New function. (emacs-lisp-mode): Add it to electric-pair-mode-hook, if elec-pair hasn't been loaded yet. --- lisp/progmodes/elisp-mode.el | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index c86277a309..5204c78131 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -233,6 +233,17 @@ emacs-lisp-mode-hook :type 'hook :group 'lisp) =20 +(defun emacs-lisp-set-electric-text-pairs () + (defvar electric-pair-text-pairs) + (let ((elisp-pairs (append '((?\` . ?\') (?=E2=80=98 . ?=E2=80=99)) + electric-pair-text-pairs))) + (save-current-buffer + (dolist (buf (buffer-list)) + (set-buffer buf) + (when (derived-mode-p 'emacs-lisp-mode) + (setq-local electric-pair-text-pairs elisp-pairs))))) + (remove-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pai= rs)) + ;;;###autoload (define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp" "Major mode for editing Lisp code to run in Emacs. @@ -245,12 +256,12 @@ emacs-lisp-mode (defvar project-vc-external-roots-function) (lisp-mode-variables nil nil 'elisp) (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) - (unless noninteractive - (require 'elec-pair) - (defvar electric-pair-text-pairs) - (setq-local electric-pair-text-pairs - (append '((?\` . ?\') (?=E2=80=98 . ?=E2=80=99)) electric-= pair-text-pairs)) - (setq-local electric-quote-string t)) + (if (boundp 'electric-pair-text-pairs) + (setq-local electric-pair-text-pairs + (append '((?\` . ?\') (?=E2=80=98 . ?=E2=80=99)) + electric-pair-text-pairs)) + (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pair= s)) + (setq-local electric-quote-string t) (setq imenu-case-fold-search nil) (add-function :before-until (local 'eldoc-documentation-function) #'elisp-eldoc-documentation-function) --=20 2.11.0 --=-=-=-- From unknown Thu Sep 11 10:04:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36539: elec-pair.elc gets surreptitiously loaded (almost) unconditionally at start up. Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jul 2019 00:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Alan Mackenzie , 36539@debbugs.gnu.org Received: via spool by 36539-submit@debbugs.gnu.org id=B36539.156349501020090 (code B ref 36539); Fri, 19 Jul 2019 00:11:01 +0000 Received: (at 36539) by debbugs.gnu.org; 19 Jul 2019 00:10:10 +0000 Received: from localhost ([127.0.0.1]:54883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoGTR-0005Dx-KY for submit@debbugs.gnu.org; Thu, 18 Jul 2019 20:10:09 -0400 Received: from mail-io1-f54.google.com ([209.85.166.54]:46202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoGTL-0005CZ-Nl; Thu, 18 Jul 2019 20:10:04 -0400 Received: by mail-io1-f54.google.com with SMTP id i10so54708128iol.13; Thu, 18 Jul 2019 17:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=2tYyUOzViWKCbbuqXy31Q+dpqtKvrgwEPjSiiWHSSlY=; b=cUfWw40Vne8lSBKNcAbyInpmrz/MYVMwH/sL3StwiOUqUKbmKQ/VOohW90cVM+eNBU JgXMUpp3Ap19ivH6aqDXlI7AsMCZA1WeHl3Bw9neZ4UdPP0QtFFbpCoDaoKiMK+U0o4F Gv56PyM8lo6cHlVU/yIDWPCLjmpc4VYiiP5nI4TwSawdERqdx5U6IsJH43kjzbHhguIP gfaXDbnpf88zfylzNxXQNsV4AuMbJLIHMMPhercljrsYGz2dJWevLU2V6e2sgIbDjIe0 Y9vc2QMHqhvnQN2HhSZXljgmVay6il6d2fBdB19BkI49vpvzJdO8rJQdmFvRZnvJKp4I TwGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=2tYyUOzViWKCbbuqXy31Q+dpqtKvrgwEPjSiiWHSSlY=; b=T339bKD9WRtLjWKXDG9bdL2HxcKbTp8GFwWQTlDeXcUNEHuoP8vvYhGngO8t3oqxSU LlLRa9vEZ3h8Klxw8pL7t+7KBAEU7PGPtWbMvvEDnBld1RxPSS55jW2ZhVKWKYKW7N8O JwZ1/J13ZuEdBaCQ+FArTDjgmFJ2uyNqF2eCi0d+jKxO7CnxEwgOPNk2l+Hi/gdAKu6z fPgNSHSYZfTf9d80jG6RKzR5GkKNEf6T71mS651k8uqnhWIaWv1JcBLdsGRi3KHKnMTg xp/jw6HW66ixTkj8B3ko+HGMPLwMEzpKadNIhANHqtIlSycEuyxbqWcHP6VvU0K9dtAu FM3g== X-Gm-Message-State: APjAAAUaSmRkI0qxYKiBUqh9hupYoxNe3v+hoc9qhZssZRtaNHziak9U cDCD5TyT4anat9HYsb9VPgu9keyx X-Google-Smtp-Source: APXvYqzphvfWASpCyZ9GUycItrrRqak5P8GfVOiB9IN16e7qK1YSixw0UI0J/YqjyLG4DTWuUu0pqQ== X-Received: by 2002:a02:a703:: with SMTP id k3mr50437736jam.12.1563494998143; Thu, 18 Jul 2019 17:09:58 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id p3sm32589152iom.7.2019.07.18.17.09.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2019 17:09:57 -0700 (PDT) From: Noam Postavsky References: <20190707141414.GA5641@ACM> <87wogt3hqr.fsf@gmail.com> <20190707182941.GA4053@ACM> <87tvbx3cmg.fsf@gmail.com> <20190707191052.GB4053@ACM> <835zo6175r.fsf@gnu.org> <87o91x1rsc.fsf@gmail.com> Date: Thu, 18 Jul 2019 20:09:57 -0400 In-Reply-To: <87o91x1rsc.fsf@gmail.com> (Noam Postavsky's message of "Sat, 13 Jul 2019 18:41:23 -0400") Message-ID: <87r26myje2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 36539 fixed close 36539 27.1 quit > Actually, I noticed a problem with it: electric-pair-mode is a global > mode, so using the local value of the hook isn't right. I think the > updated patch below is correct. > Subject: [PATCH] Don't load elec-pair in elisp-mode (Bug#36539) > > * lisp/progmodes/elisp-mode.el (emacs-lisp-set-electric-text-pairs): > New function. > (emacs-lisp-mode): Add it to electric-pair-mode-hook, if elec-pair > hasn't been loaded yet. Pushed to master. 8f54998827 2019-07-18T20:06:27-04:00 "Don't load elec-pair in elisp-mode (Bug#36539)" https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=8f54998827e416fe1fca7bc384bf0a6281b73f1b