GNU bug report logs -
#24901
Patch to add support for curly quotes to electric-pair-mode
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Tue, 8 Nov 2016 12:01:02 UTC
Severity: wishlist
Tags: patch
Done: Reuben Thomas <rrt <at> sc3d.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 24901 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2 December 2016 at 09:45, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Reuben Thomas <rrt <at> sc3d.org>
> > Date: Mon, 28 Nov 2016 22:24:39 +0000
> >
> > From 4a04639203dca2d5903fd943e5fb2e4ccc7b995f Mon Sep 17 00:00:00 2001
> > From: Reuben Thomas <rrt <at> 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).
>
> Can you tell more about this? The original bug report doesn't include
> any rationale, so it's hard for me to make up my mind about this
> change.
>
​Rationale: electric-pair-mode already has support for straight
double-quote pairs, so it is logical to add support for curly double-quote
pairs. As with straight double quotes, it's logical that these be supported
everywhere. The same goes for straight single quotes, which are generally
used for the same purpose as curly double and single double quotes, that
is, quoting (in human language).
The use of electric-quote-chars means that electric-pair-mode will
automatically use whatever the user has configured for single and double
quotes.
In particular, I don't understand the last sentence of the log
> message; can you elaborate?
>
​electric-pair-mode does not by default produce pairs of straight single
quote (apostrophe). This is because it does not always make sense: a single
apostrophe is often used on its own. However, with curly single quotes, it
makes sense for electric-pair-mode to make typing a left curly quote
automatically add a corresponding right quote, as left curly quotes are not
normally used on their own. (Right single curly quotes can be used on their
own, as an apostrophe, but this is irrelevant here, as electric-pair-mode
acts when the left-hand mark is typed, not the right-hand mark).
--
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]
This bug report was last modified 7 years and 279 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.