From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#24901: Fwd: Caught mistake in elec-pair.el patch Date: Sun, 13 Aug 2017 12:03:01 +0100 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e0822cbec96c1f80556a07e01" X-Trace: blaine.gmane.org 1502622261 23992 195.159.176.226 (13 Aug 2017 11:04:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 13 Aug 2017 11:04:21 +0000 (UTC) To: 24901@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 13 13:04:17 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 1dgqgh-0005WE-Ej for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Aug 2017 13:04:07 +0200 Original-Received: from localhost ([::1]:36698 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgqgn-0000HX-W9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Aug 2017 07:04:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgqgg-0000GS-VE for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2017 07:04:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgqgc-0005Ja-KI for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2017 07:04:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50567) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgqgc-0005JQ-GO for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2017 07:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dgqgc-0007C9-8W for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2017 07:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Aug 2017 11:04: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.150262220927649 (code B ref 24901); Sun, 13 Aug 2017 11:04:02 +0000 Original-Received: (at 24901) by debbugs.gnu.org; 13 Aug 2017 11:03:29 +0000 Original-Received: from localhost ([127.0.0.1]:59248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgqg4-0007Bt-Q8 for submit@debbugs.gnu.org; Sun, 13 Aug 2017 07:03:29 -0400 Original-Received: from mail-qt0-f180.google.com ([209.85.216.180]:38250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgqg3-0007Bn-Mn for 24901@debbugs.gnu.org; Sun, 13 Aug 2017 07:03:28 -0400 Original-Received: by mail-qt0-f180.google.com with SMTP id t37so39916862qtg.5 for <24901@debbugs.gnu.org>; Sun, 13 Aug 2017 04:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=NN9RCvnkzaTa6UeK0sqbrOrohJvgFTGndt3NymiMnE4=; b=ZGyLF6zk8lxOUPBmPjQg0o8UP/YMADsIR1awi5LyMi/pKeMPUVrnGh24rxkGU3StVg NVTpTrbCUfICEvf7P/qPgkCHuQOJ3VuE1BvhEPV81Cq09xZE/oZycnQu+K5UMmO1+oVj 34rWqOA11ESdwLEb6P3rpMWAj1snboZXalGQi+Xc1xXEUm5AZnBmf5uvuXd0kBFkQTj6 d54K9TL7EiqiQYTFQGPiJEVTiGUCV4uoMuLcxj04IVjGiKCRm1WNyIHxLVL38NHL4nmf qNNUv7SKgS6GT0mbBd36HIyBUX7nTYzIoT6kMOlSL7ZhJ85zPgPQBZ4HvAUSVH9680Ly xhKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=NN9RCvnkzaTa6UeK0sqbrOrohJvgFTGndt3NymiMnE4=; b=Zuv4/6VOcO6oczNBnVgfHWCtEYEw2UmU+rmsYxbmbboM05S4sIfPgfeN94df4T7nUf vwynabshHrK+zhpdQGE33dKLpbaTWssuaouQmdALFSVi4KNIHtL/7OZpWORzqPLQted8 TYFupco1OOdFq5jIgKdb0bjYB560PZH1SFyrRsWPAE5tM4P2EGaDx1xHyws8oC4N3eYC HpswpxPDw2cTZDzBGs9bXmiQANMFKThuQKAYSv7l8BGOtepot4mwxedTOvTSBEjWaE0B aL5LxfyaISKUajR/wfM8z45MyRJErXvhJpWMMQPo8AxK+UCEPv/C6jGPRJK/rLdAdyGq QoUQ== X-Gm-Message-State: AHYfb5giA2iAZ6UM51osRPdfdsUqnO1IMeJ+YWpvZeeqyyBoM3xamyVl IzChc+q7beyeSSvp+rgKeslpkxqP9enb X-Received: by 10.200.11.1 with SMTP id e1mr27668184qti.251.1502622202117; Sun, 13 Aug 2017 04:03:22 -0700 (PDT) Original-Received: by 10.12.179.20 with HTTP; Sun, 13 Aug 2017 04:03:01 -0700 (PDT) In-Reply-To: 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:135717 Archived-At: --089e0822cbec96c1f80556a07e01 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable After unarchiving this bug just to add this commnet. ---------- Forwarded message ---------- From: Jo=C3=A3o T=C3=A1vora Date: Sun, Aug 13, 2017 at 11:57 AM Subject: Caught mistake in elec-pair.el patch To: 24901@debbugs.gnu.org, rrt@sc3d.org, Eli Zaretskii Hi Reuben, Casually glancing at the source for lisp/elec-pair.el I have found an error. You cannot use lists like (nth 0 electric-quote-chars) inside a quoted list as you did in your patch of Nov. 8 2016. The list will not be evaluated. Perhaps you were distracted by the grim events taking place that day :-) Anyway, I think you meant backquote-and-comma so I'll install this fix soon= , unless anyone objects. Jo=C3=A3o diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index 87e82e2..4ede4f1 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el @@ -28,9 +28,9 @@ ;;; Electric pairing. (defcustom electric-pair-pairs - '((?\" . ?\") - ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars)) - ((nth 2 electric-quote-chars) . (nth 3 electric-quote-chars))) + `((?\" . ?\") + (,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars)) + (,(nth 2 electric-quote-chars) . ,(nth 3 electric-quote-chars))) "Alist of pairs that should be used regardless of major mode. Pairs of delimiters in this list are a fallback in case they have @@ -44,9 +44,9 @@ electric-pair-pairs ;;;###autoload (defcustom electric-pair-text-pairs - '((?\" . ?\" ) - ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars)) - ((nth 2 electric-quote-chars) . (nth 3 electric-quote-chars))) + `((?\" . ?\" ) + (,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars)) + (,(nth 2 electric-quote-chars) . ,(nth 3 electric-quote-chars))) "Alist of pairs that should always be used in comments and strings. Pairs of delimiters in this list are a fallback in case they have --=20 Jo=C3=A3o T=C3=A1vora --089e0822cbec96c1f80556a07e01 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
After unarchiving this bug just to add this commnet.
<= br>
---------- Forwarded message ----------
Fr= om: Jo=C3=A3o T=C3=A1vora <joaotavora= @gmail.com>
Date: Sun, Aug 13, 2017 at 11:57 AM
Subject= : Caught mistake in elec-pair.el patch
To: 24901@debbugs.gnu.org, rrt@sc3d.org, Eli Zaretskii <eliz@gnu.org>


=
Hi Reuben,

Casually glancing at t= he source for lisp/elec-pair.el I have found an error.=C2=A0

=
You cannot use lists like (nth 0 electric-quote-chars) inside a quoted= list as=C2=A0
you did in your patch of Nov. 8 2016. The list wil= l not be evaluated. Perhaps=C2=A0
you were distracted by the grim= events taking place that day :-)=C2=A0

Anyway, I = think you meant backquote-and-comma so I'll install this fix soon,
unless anyone objects.

Jo=C3=A3o
<= br>

diff --git a/lisp/elec-pair.el b/lisp/ele= c-pair.el
index 87e82e2..4ede4f1 100644
--- a/lisp/elec= -pair.el
+++ b/lisp/elec-pair.el
@@ -28,9 +28,9 @@
=C2=A0;;; Electric pairing.
=C2=A0
=C2=A0(defcust= om electric-pair-pairs
- =C2=A0'((?\" . ?\")
<= div>- =C2=A0 =C2=A0((nth 0 electric-quote-chars) . (nth 1 electric-quote-ch= ars))
- =C2=A0 =C2=A0((nth 2 electric-quote-chars) . (nth 3 elect= ric-quote-chars)))
+ =C2=A0`((?\" . ?\")
+ = =C2=A0 =C2=A0(,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars)= )
+ =C2=A0 =C2=A0(,(nth 2 electric-quote-chars) . ,(nth 3 electri= c-quote-chars)))
=C2=A0 =C2=A0"Alist of pairs that should be= used regardless of major mode.
=C2=A0
=C2=A0Pairs of d= elimiters in this list are a fallback in case they have
@@ -44,9 = +44,9 @@ electric-pair-pairs
=C2=A0
=C2=A0;;;###autoloa= d
=C2=A0(defcustom electric-pair-text-pairs
- =C2=A0= 9;((?\" . ?\" )
- =C2=A0 =C2=A0((nth 0 electric-quote-c= hars) . (nth 1 electric-quote-chars))
- =C2=A0 =C2=A0((nth 2 elec= tric-quote-chars) . (nth 3 electric-quote-chars)))
+ =C2=A0`((?\&= quot; . ?\" )
+ =C2=A0 =C2=A0(,(nth 0 electric-quote-chars) = . ,(nth 1 electric-quote-chars))
+ =C2=A0 =C2=A0(,(nth 2 electric= -quote-chars) . ,(nth 3 electric-quote-chars)))
=C2=A0 =C2=A0&quo= t;Alist of pairs that should always be used in comments and strings.
<= div>=C2=A0
=C2=A0Pairs of delimiters in this list are a fallback = in case they have




--
Jo=C3=A3o T=C3= =A1vora
--089e0822cbec96c1f80556a07e01--