From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: stephen.berman@gmx.net, 70984@debbugs.gnu.org
Subject: bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
Date: Fri, 17 May 2024 14:15:31 +0200 [thread overview]
Message-ID: <87a5koiqho.fsf@gmail.com> (raw)
In-Reply-To: <864jawhg5f.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 May 2024 13:44:12 +0300")
>>>>> On Fri, 17 May 2024 13:44:12 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> From: Robert Pluim <rpluim@gmail.com>
>> Cc: Stephen Berman <stephen.berman@gmx.net>, 70984@debbugs.gnu.org
>> Date: Fri, 17 May 2024 09:45:14 +0200
>>
>> Iʼm assuming this means youʼre both ok with the key sequences I chose.
Eli> I don't have any objections, but I'm not going to be a frequent user
Eli> of this, so I guess we'll let the users judge that.
Apropos, what about the following for electric-quote-chars? I think
Iʼve covered most of the common combinations:
diff --git a/lisp/electric.el b/lisp/electric.el
index fee0bf36d7f..406eac2f3a1 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -506,12 +506,55 @@ electric-quote-string
:version "25.1"
:type 'boolean :safe 'booleanp :group 'electricity)
+(define-widget 'electric-quote-chars-type 'lazy
+ "Display list of electric quote chars."
+ :group 'electricity
+ :format "%t:\n%v\n"
+ :type '(list (character :tag "Left single quote ")
+ (character :tag "Right single quote")
+ (character :tag "Left double quote ")
+ (character :tag "Right double quote")))
+
(defcustom electric-quote-chars '(?‘ ?’ ?“ ?”)
"Curved quote characters for `electric-quote-mode'.
This list's members correspond to left single quote, right single
-quote, left double quote, and right double quote, respectively."
+quote, left double quote, and right double quote, respectively.
+
+There are predefined settings for common styles, or you can define
+your own custom style."
:version "26.1"
- :type '(list character character character character)
+ :type '(choice
+ ;; The countries and languages mentioned here are not intended
+ ;; to be an exhaustive list.
+ ;; US English, Canada, India, Brazil…, almost everywhere in
+ ;; fact.
+ (electric-quote-chars-type :tag "Default" (?‘ ?’ ?“ ?”))
+ ;; This style has ?“ and ?” as first level quotation,
+ ;; which is why they're on the single quote, not double quote.
+ ;; UK English
+ (electric-quote-chars-type :tag "Reversed" (?“ ?” ?‘ ?’ ))
+ ;; France
+ (electric-quote-chars-type :tag "Guillemets" (?« ?» ?« ?»))
+ ;; Switzerland
+ (electric-quote-chars-type :tag "Single/double guillemets" (?‹ ?› ?« ?»))
+ ;; Norway
+ (electric-quote-chars-type :tag "Single quote guillemets" (?‘ ?’ ?« ?»))
+ ;; Greece, Italy, Portugal
+ (electric-quote-chars-type :tag "Guillemets double quote" (?« ?» ?“ ?”))
+ ;; This style also has ?“ and ?” as first level quotation,
+ ;; Spain, Ukraine
+ (electric-quote-chars-type :tag "Double quote guillemets" (?“ ?” ?« ?» ))
+ ;; Hebrew, Sweden
+ (electric-quote-chars-type :tag "Right only" (?’ ?’ ?” ?”))
+ ;; Netherlands
+ (electric-quote-chars-type :tag "Low/high right only" (?‚ ?’ ?„ ?”))
+ ;; Germany
+ (electric-quote-chars-type :tag "Low/high right/left" (?‚ ?‘ ?„ ?“))
+ ;; Chinese, simplified.
+ (electric-quote-chars-type :tag "Corners" (?「 ?」 ?『 ?』))
+ ;; Chinese, traditional.
+ (electric-quote-chars-type :tag "Corners reversed" (?『 ?』?「 ?」))
+ (electric-quote-chars-type :tag "Custom" (?‘ ?’ ?“ ?”)))
:safe (lambda (x)
(pcase x
(`(,(pred characterp) ,(pred characterp)
Robert
--
next prev parent reply other threads:[~2024-05-17 12:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 14:35 bug#70984: 30.0.50; Improved support for entering quotation marks Robert Pluim
2024-05-16 15:55 ` Eli Zaretskii
2024-05-17 7:45 ` bug#70984: 30.0.50; Improved support for entering quotation marks, " Robert Pluim
2024-05-17 8:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 8:59 ` Robert Pluim
2024-05-17 9:59 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 12:10 ` Robert Pluim
2024-05-17 12:53 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 13:15 ` Robert Pluim
2024-05-17 13:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03 11:33 ` Robert Pluim
2024-05-17 10:44 ` Eli Zaretskii
2024-05-17 12:15 ` Robert Pluim [this message]
2024-05-17 13:05 ` Eli Zaretskii
2024-05-17 13:27 ` Robert Pluim
2024-05-17 13:38 ` Eli Zaretskii
2024-05-17 15:41 ` Robert Pluim
2024-05-18 10:57 ` Eli Zaretskii
2024-05-16 16:05 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a5koiqho.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=70984@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=stephen.berman@gmx.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.