unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
To: 24901@debbugs.gnu.org
Subject: bug#24901: Patch updated slightly
Date: Mon, 28 Nov 2016 22:24:39 +0000	[thread overview]
Message-ID: <CAOnWdoi9uyCuNhQSZJe=1y2ghukhcMQo6zoy53RbSWqj6y7fkQ@mail.gmail.com> (raw)
In-Reply-To: <CAOnWdoiOS89kxmMXe_Cmk475pL8CQ83sF2eXjBx2-ERio4FUjQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 296 bytes --]

On 8 November 2016 at 17:52, Reuben Thomas <rrt@sc3d.org> wrote:

> I updated the patch to fix a typo (first character of sentence not in
> upper case), and to add the bug number.
>

​I updated the patch to use the quote characters from electric-quote-chars.

-- 
http://rrt.sc3d.org

[-- Attachment #1.2: Type: text/html, Size: 933 bytes --]

[-- Attachment #2: 0001-Add-support-for-curly-quotation-marks-to-electric-pa.patch --]
[-- Type: text/x-patch, Size: 1617 bytes --]

From 4a04639203dca2d5903fd943e5fb2e4ccc7b995f Mon Sep 17 00:00:00 2001
From: Reuben Thomas <rrt@sc3d.org>
Date: Tue, 8 Nov 2016 11:53:20 +0000
Subject: [PATCH 1/4] Add support for curly quotation marks to
 electric-pair-mode

* lisp/elec-pair.el (electric-pair-pairs, electric-pair-text-pairs): Add
entries for left/right single/double quotation marks, from
electric-quote-chars. Note that this is safe for single quotation marks,
unlike with the ASCII apostrophe, since, although the right quotation
mark can be used as an apostrophe, it is the left quotation mark that is
typed to get a pair (Bug#24901).
---
 lisp/elec-pair.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
index 1162920..47d44b1 100644
--- a/lisp/elec-pair.el
+++ b/lisp/elec-pair.el
@@ -28,7 +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)))
   "Alist of pairs that should be used regardless of major mode.
 
 Pairs of delimiters in this list are a fallback in case they have
@@ -42,7 +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)))
   "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
-- 
2.7.4


  reply	other threads:[~2016-11-28 22:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 12:00 bug#24901: Patch to add support for curly quotes to electric-pair-mode Reuben Thomas
     [not found] ` <handler.24901.B.147860642916617.ack@debbugs.gnu.org>
2016-11-08 17:08   ` bug#24901: Acknowledgement (Patch to add support for curly quotes to electric-pair-mode) Reuben Thomas
2016-11-08 17:52 ` bug#24901: Patch updated slightly Reuben Thomas
2016-11-28 22:24   ` Reuben Thomas [this message]
2016-12-02  9:45     ` Eli Zaretskii
2016-12-02 14:42       ` Reuben Thomas
2016-12-02 15:26         ` Eli Zaretskii
2016-12-02 15:40           ` Reuben Thomas
2016-12-02 15:55             ` Eli Zaretskii
2016-12-02 16:04               ` Eli Zaretskii
2016-12-02 16:09               ` Reuben Thomas
2016-12-03  0:20 ` bug#24901: Reuben Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOnWdoi9uyCuNhQSZJe=1y2ghukhcMQo6zoy53RbSWqj6y7fkQ@mail.gmail.com' \
    --to=rrt@sc3d.org \
    --cc=24901@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).