bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24901: Fwd: Caught mistake in elec-pair.el patch


From: João Távora
Subject: bug#24901: Fwd: Caught mistake in elec-pair.el patch
Date: Sun, 13 Aug 2017 12:03:01 +0100

After unarchiving this bug just to add this commnet.

---------- Forwarded message ----------
From: João Távora <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 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ão


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




--
João Távora

reply via email to

[Prev in Thread] Current Thread [Next in Thread]