From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24901: Caught mistake in elec-pair.el patch Date: Thu, 17 Aug 2017 08:35:39 -0400 Message-ID: <871soaz810.fsf@users.sourceforge.net> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1502973324 12905 195.159.176.226 (17 Aug 2017 12:35:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 17 Aug 2017 12:35:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 24901@debbugs.gnu.org, Reuben Thomas To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 17 14:35:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diK13-0002Zo-Fy for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Aug 2017 14:35:13 +0200 Original-Received: from localhost ([::1]:49681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diK14-0003ws-Qj for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Aug 2017 08:35:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diK0z-0003uw-4k for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2017 08:35:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1diK0t-0005ko-3t for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2017 08:35:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1diK0s-0005jh-Ta for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2017 08:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1diK0s-0004k7-ES for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2017 08:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Aug 2017 12:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24901 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24901-submit@debbugs.gnu.org id=B24901.150297324918169 (code B ref 24901); Thu, 17 Aug 2017 12:35:02 +0000 Original-Received: (at 24901) by debbugs.gnu.org; 17 Aug 2017 12:34:09 +0000 Original-Received: from localhost ([127.0.0.1]:42069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diK01-0004iz-JS for submit@debbugs.gnu.org; Thu, 17 Aug 2017 08:34:09 -0400 Original-Received: from mail-io0-f181.google.com ([209.85.223.181]:36942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diJzz-0004im-PN for 24901@debbugs.gnu.org; Thu, 17 Aug 2017 08:34:08 -0400 Original-Received: by mail-io0-f181.google.com with SMTP id c74so22434638iod.4 for <24901@debbugs.gnu.org>; Thu, 17 Aug 2017 05:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=gtY99qSoMhxi9zHN6uU+/evEbud18KoMhMrQmOh9bqI=; b=mYWRAZsCFKCm24a/hEJcbZfWB6exbTYUugV52Sd5L7fGb+H6f905WZtYUURmQ350mE qDIn24hwR7qm7UqXViVdSZS2ZcGFRZRFY21yVjdy/nkh2uGBMwJmTaHNXFW/66mWD+JR gJEGSJqX+qjDXd3qjK3zBZSo5xp6HWV9gW1rM0Cn5xmsGi1dfGsjCbJKuglgAkmQFqYy I4KJRIACIgW+xvR8WsSqpJI6CzfLDu6IW5CEEqaHGh0O9ixuliYTzQN41WK5UZU30oBE 07y1wdGvvQ8ul1dhHTikjHRloEUIAaAZTTv8jLhDgt5bmbtg6dXYgBDooGc7Fb5ZqNS4 9ffg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=gtY99qSoMhxi9zHN6uU+/evEbud18KoMhMrQmOh9bqI=; b=lg7fmQwG47YCN8BHOakcBehkrnKraQ1SCJUpxROmS0GZSZUDTCg/bWoR825fJZ1KZA AKaEbaHgzRkdNkGZ/c5X4U38VtcPFWIumdBT+DsB0FSbaz7FHxh5AHn7gxaCAPvqiYvX N0L65H4l76gRc8it4MrlETAXmi2ldujwrAudSYNy1CY5v6a8G69Du7ofLy9AARp/hjl9 U32yxspCYZQNYWemz3HPalxfcSlzrJmxfRXledfwawhzTV2zV5cVxjEjJGS6EwCQJWAu dlgtfhubPUhWuGZ1zhoPIshUI7E6MWGNYK8hY+c16THa5FVYN0EP18lYJofnISwtU3b+ u1Uw== X-Gm-Message-State: AHYfb5g/thxSwTSloJV2R5aKbznd6qTB9pVE3YeQsy5dPsc4yOhqe+EH z8s9+cvvJl8g1Q== X-Received: by 10.107.169.74 with SMTP id s71mr4479989ioe.329.1502973242171; Thu, 17 Aug 2017 05:34:02 -0700 (PDT) Original-Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id r21sm1585987ita.16.2017.08.17.05.34.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Aug 2017 05:34:01 -0700 (PDT) In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 17 Aug 2017 11:32:10 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135864 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jo=C3=A3o T=C3=A1vora writes: > Turns out it's not so simple, because electric-pair-text-pairs is autoloa= ded > and thus relying on electric-quote-chars is a problem. > > Loading loaddefs.el (source)... > Symbol's value as variable is void: electric-quote-chars > Makefile:535: recipe for target 'emacs' failed > > I could: > > 1. Add an autoload to electric-quote-chars. (Unfortunately I seem to fail= at that, > just adding the cookie isn't enough, it has to go into ldefs-boot.el some= how). Or remove the autoload from electric-pair-text-pairs? --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-lisp-elec-pair.el-electric-pair-text-pairs-Don-t-aut.patch Content-Transfer-Encoding: quoted-printable Content-Description: patch >From 57a68d001c0851ce10b1b8be47bc8db12b7789f1 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Thu, 17 Aug 2017 07:06:47 -0400 Subject: [PATCH] * lisp/elec-pair.el (electric-pair-text-pairs): Don't autoload (Bug#24901). * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Require `elec-pair' explicitly in the interactive case. --- lisp/elec-pair.el | 1 - lisp/progmodes/elisp-mode.el | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index 87e82e24fb..f990851185 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el @@ -42,7 +42,6 @@ electric-pair-pairs :group 'electricity :type '(repeat (cons character character))) =20 -;;;###autoload (defcustom electric-pair-text-pairs '((?\" . ?\" ) ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars)) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 47739f5957..0bf8857960 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -231,9 +231,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) - (setq-local electric-pair-text-pairs - (append '((?\` . ?\') (?=E2=80=98 . ?=E2=80=99)) electric-pa= ir-text-pairs)) - (setq-local electric-quote-string t) + (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)) (setq imenu-case-fold-search nil) (add-function :before-until (local 'eldoc-documentation-function) #'elisp-eldoc-documentation-function) --=20 2.14.1 --=-=-=--