From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs 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 Message-ID: <87a5koiqho.fsf@gmail.com> References: <87r0e1j03u.fsf@gmail.com> <87r0e1j03u.fsf@gmail.com> <86cypliwf5.fsf@gnu.org> <87msooj305.fsf@gmail.com> <864jawhg5f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25871"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stephen.berman@gmx.net, 70984@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 17 14:17:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s7wWZ-0006U1-4z for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 May 2024 14:17:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7wWF-00085S-04; Fri, 17 May 2024 08:17:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7wWB-00085D-VD for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 08:17:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7wWB-0004OJ-N3 for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 08:16:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7wWE-0000Qv-G8 for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 08:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 May 2024 12:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70984 X-GNU-PR-Package: emacs Original-Received: via spool by 70984-submit@debbugs.gnu.org id=B70984.17159482031656 (code B ref 70984); Fri, 17 May 2024 12:17:02 +0000 Original-Received: (at 70984) by debbugs.gnu.org; 17 May 2024 12:16:43 +0000 Original-Received: from localhost ([127.0.0.1]:54872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7wVu-0000Qe-G5 for submit@debbugs.gnu.org; Fri, 17 May 2024 08:16:42 -0400 Original-Received: from mail-wm1-f46.google.com ([209.85.128.46]:45181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7wVt-0000QY-2W for 70984@debbugs.gnu.org; Fri, 17 May 2024 08:16:41 -0400 Original-Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4202959b060so392915e9.2 for <70984@debbugs.gnu.org>; Fri, 17 May 2024 05:16:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715948132; x=1716552932; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bPls4EplOGY1nBX+jSYDyGmAuIsxTv4iPnoQM4pH73M=; b=LTwR8prhCAMD8/U4pooYqInY1SM3rkEGWk308B/7TGkZcAolvM2PeRtVM0Wsc2UUzz PIBiTHFiQwLo5bj7WEPU7wagd1lba7YKUZho55q5Ut37nkSw3Q+J8m0TxXh/wMH7mdzq Q18YR3vn7Rfr/3OYDK//wloCfH2z9Ya5QLSDgpswX/qvI/PKkOlRGB+2qNF3cpAY36kN B4FtgjFI2PzL5k6pBYezSuhNDEUZVtHkJO81CBIeATOUVYpZIK6PC3aIBybnsXt9FYxb uER8bNym1Fgq2IUYQSLmvktg/oqX9LLJYeGcs5qkMoB2pC4aANw3Jbk7htd2V9ibKmBS I5PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715948132; x=1716552932; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bPls4EplOGY1nBX+jSYDyGmAuIsxTv4iPnoQM4pH73M=; b=QyRXGZxhiv5zTfNObXaoO/VsUuEkqN3FGCPvcYbEgWfAm70CaFt0Y3hFgqX0NOz1uZ cFD0H9bnHW+JikOhunbZVB6JqGg82v9FtlpFHrU2pPKXy0gYRzqnD5Sz5uY9fjMluHbW EQrouX6gYzVJPcKKZnP7ayeEslQkK3r9JGmYl6Fn8MVOMBDmXRn+FgPXveWQCQ/xnT3a sx1EsKnIFywBEz2Yg7GCrapBVtLYbMtWpPEFjGFZ0Ft5y4cL9Id1mr2f/XotQ25a01nF dPagQHTK3IrtXRfjtdN210K2OYcmRrqt6du+DYaH3xs7jvHTHJDhQqGA2epXWyJfcJTW l23g== X-Forwarded-Encrypted: i=1; AJvYcCXbACTju34+UWjGUfzIOJifHmBDB/pul3JvMXSP1g2KfIA9WZEm8aMSy6ikyXiQNiP/Bge4F8GRgS/+7aSapKRSporJUdQ= X-Gm-Message-State: AOJu0Yyb6fvRpiBpB+deBwmfelsJn3BGnFb9kG0svWKVTTgFadvHWliu w5ylfM4KiBO+rUpMlV5I2cEg+dy0maYh5ulcgwKa4xM6bIEg31dF3w6j5Q== X-Google-Smtp-Source: AGHT+IF7HEkb9vzjBdDJSlt2maFyCyOnI9QuOBa15SSMJVcp+dH2M5AtV3JUeoQwWPo8ht3IXECfZA== X-Received: by 2002:a05:600c:2187:b0:419:ec38:f34b with SMTP id 5b1f17b1804b1-41feaa439d6mr162406275e9.20.1715948132182; Fri, 17 May 2024 05:15:32 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41ff7a840d2sm265734445e9.39.2024.05.17.05.15.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 05:15:31 -0700 (PDT) In-Reply-To: <864jawhg5f.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 May 2024 13:44:12 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285235 Archived-At: >>>>> On Fri, 17 May 2024 13:44:12 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: Stephen Berman , 70984@debbugs.gnu.org >> Date: Fri, 17 May 2024 09:45:14 +0200 >>=20 >> I=CA=BCm assuming this means you=CA=BCre both ok with the key sequen= ces I chose. Eli> I don't have any objections, but I'm not going to be a frequent us= er 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=CA=BCve 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) =20 +(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 '(?=E2=80=98 ?=E2=80=99 ?=E2=80=9C ?=E2=80= =9D) "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=E2=80=A6, almost everywhere= in + ;; fact. + (electric-quote-chars-type :tag "Default" (?=E2=80=98 ?=E2=80=99= ?=E2=80=9C ?=E2=80=9D)) + ;; This style has ?=E2=80=9C and ?=E2=80=9D as first level quota= tion, + ;; which is why they're on the single quote, not double quote. + ;; UK English + (electric-quote-chars-type :tag "Reversed" (?=E2=80=9C ?=E2=80= =9D ?=E2=80=98 ?=E2=80=99 )) + ;; France + (electric-quote-chars-type :tag "Guillemets" (?=C2=AB ?=C2=BB ?= =C2=AB ?=C2=BB)) + ;; Switzerland + (electric-quote-chars-type :tag "Single/double guillemets" (?=E2= =80=B9 ?=E2=80=BA ?=C2=AB ?=C2=BB)) + ;; Norway + (electric-quote-chars-type :tag "Single quote guillemets" (?=E2= =80=98 ?=E2=80=99 ?=C2=AB ?=C2=BB)) + ;; Greece, Italy, Portugal + (electric-quote-chars-type :tag "Guillemets double quote" (?=C2= =AB ?=C2=BB ?=E2=80=9C ?=E2=80=9D)) + ;; This style also has ?=E2=80=9C and ?=E2=80=9D as first level = quotation, + ;; Spain, Ukraine + (electric-quote-chars-type :tag "Double quote guillemets" (?=E2= =80=9C ?=E2=80=9D ?=C2=AB ?=C2=BB )) + ;; Hebrew, Sweden + (electric-quote-chars-type :tag "Right only" (?=E2=80=99 ?=E2=80= =99 ?=E2=80=9D ?=E2=80=9D)) + ;; Netherlands + (electric-quote-chars-type :tag "Low/high right only" (?=E2=80= =9A ?=E2=80=99 ?=E2=80=9E ?=E2=80=9D)) + ;; Germany + (electric-quote-chars-type :tag "Low/high right/left" (?=E2=80= =9A ?=E2=80=98 ?=E2=80=9E ?=E2=80=9C)) + ;; Chinese, simplified. + (electric-quote-chars-type :tag "Corners" (?=E3=80=8C ?=E3=80=8D= ?=E3=80=8E ?=E3=80=8F)) + ;; Chinese, traditional. + (electric-quote-chars-type :tag "Corners reversed" (?=E3=80=8E ?= =E3=80=8F?=E3=80=8C ?=E3=80=8D)) + (electric-quote-chars-type :tag "Custom" (?=E2=80=98 ?=E2=80=99 = ?=E2=80=9C ?=E2=80=9D))) :safe (lambda (x) (pcase x (`(,(pred characterp) ,(pred characterp) Robert --=20