From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Enable customisation for electric-quote-mode chars Date: Mon, 29 Aug 2016 18:08:25 +0300 Message-ID: <83fupnbok6.fsf@gnu.org> References: <87d1ksdtzg.fsf@xi.bootis> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1472483360 29899 195.159.176.226 (29 Aug 2016 15:09:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 Aug 2016 15:09:20 +0000 (UTC) Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org To: =?utf-8?B?R8O2a3R1xJ8=?= Kayaalp Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 29 17:09:15 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beOBW-0007RZ-Ce for ged-emacs-devel@m.gmane.org; Mon, 29 Aug 2016 17:09:14 +0200 Original-Received: from localhost ([::1]:43986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beOBT-0002Z4-VV for ged-emacs-devel@m.gmane.org; Mon, 29 Aug 2016 11:09:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beOB2-0002HQ-US for emacs-devel@gnu.org; Mon, 29 Aug 2016 11:08:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beOAy-0005bt-Ls for emacs-devel@gnu.org; Mon, 29 Aug 2016 11:08:43 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beOAy-0005bZ-IK; Mon, 29 Aug 2016 11:08:40 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4337 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1beOAv-0002bc-93; Mon, 29 Aug 2016 11:08:39 -0400 In-reply-to: <87d1ksdtzg.fsf@xi.bootis> (message from =?utf-8?B?R8O2a3R1?= =?utf-8?B?xJ8=?= Kayaalp on Mon, 29 Aug 2016 08:28:19 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206874 Archived-At: > From: Göktuğ Kayaalp > Cc: eliz@gnu.org, emacs-devel@gnu.org > Date: Mon, 29 Aug 2016 08:28:19 +0300 > > +@vindex electric-quote-chars > Electric Quote mode makes it easier to type curved quotes. As you > type characters it optionally converts @t{`} to @t{‘}, @t{'} to @t{’}, > @t{``} to @t{“}, and @t{''} to @t{”}. These conversions are > suppressed in buffers whose coding systems cannot represent curved > -quote characters. > +quote characters. It's possible to change the default quotes listed > +above, by customizing the variable @code{electric-quote-chars}, a list > +of four characters, where the items correspond to the left single > +quote, the right single quote, the left double quote and the right > +double quote, respectively, whose default value is > +@code{'(?‘ ?’ ?“ ?”)}. There's no need to go to such detail when describing a customizable option. The Customize interface should be enough for the user to figure out what to do. Which brings me to this: > +(defcustom electric-quote-chars '(?‘ ?’ ?“ ?”) > + "Curved quote characters for `electric-quote-mode'. > +The items correspond to the left single quote, the right single > +quote, the left double quote, and the right double quote, respectively." > + :version "25.1" > + :type 'list :safe 'listp :group 'electricity) > + Making it a list with minimal explanations sounds like not very user-friendly. How about offering several ready out-of-the-box sets, each one for some culture we know about? We could also allow a raw list, for the power users, but I think less advanced Emacs users will appreciate something like Default (‘..’ “..”) Arabic (".." ”..“) German (‚..‛ „..“) French (‹..› «..») Cyrillic (‚..‘ «..») etc. WDYT? (See https://en.wikipedia.org/wiki/Quotation_mark for some more.) Thanks.