[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Enable customisation for electric-quote-mode chars
From: |
Göktuğ Kayaalp |
Subject: |
Re: [PATCH] Enable customisation for electric-quote-mode chars |
Date: |
Mon, 29 Aug 2016 19:27:42 +0300 |
> From: Eli Zaretskii <address@hidden>
> Date: 2016-08-29 06:08:25 PM +0300
> Eli Zaretskii wrote:
>> From: Göktuğ Kayaalp <address@hidden>
>> Cc: address@hidden, address@hidden
>> Date: Mon, 29 Aug 2016 08:28:19 +0300
(I'm sorry for /borrowing/ your citation style, but it's very nice, I
couldn't refuse. Hope that doesn't annoy you :) I've made it a bit
different though.)
>> address@hidden 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
>> address@hidden'(?‘ ?’ ?“ ?”)}.
>
> 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.
Then I can remove the part after reference to the variable name, and
improve the defcustom's documentation (see below). Is that okay?
> 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.)
Well I think we'd rather not do that but improve the docstring instead,
because, looking at the big summary table on the page you linked [1]
there's not only a lot of variance among languages, but some of them
have multiple standard and alternative forms, and some don't have single
quotes (e.g. Persian). I think we'd better keep the defaults and
improve the documentation, and not have implement all the languages nor
have to pick a subset.
Maybe we could leave setting these variables to the language environment
if that's possible? Though I'm not familiar with that feature, but
maybe we apply this as is after I update the documentation and
developers of that feature would extend it as need appears.
Please direct me on how to proceed, and I'll update the patch as soon as
I can (I'll mail my copyright assignment tomorrow, which'll take one to
two weeks to arrive). This is my first patch to Emacs, so I'm sorry if
I'm making newbie mistakes.
[1] https://en.wikipedia.org/wiki/Quotation_mark#Summary_table
> Thanks.
>
Best,
-goktug.
--
İ. Göktuğ Kayaalp.
http://gkayaalp.com/
- Re: [PATCH] Enable customisation for electric-quote-mode chars, (continued)
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Eli Zaretskii, 2016/08/27
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Göktuğ Kayaalp, 2016/08/27
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Paul Eggert, 2016/08/27
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Göktuğ Kayaalp, 2016/08/27
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Paul Eggert, 2016/08/28
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Göktuğ Kayaalp, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Paul Eggert, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Eli Zaretskii, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Yuri Khan, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Eli Zaretskii, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars,
Göktuğ Kayaalp <=
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Eli Zaretskii, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Göktuğ Kayaalp, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Paul Eggert, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Eli Zaretskii, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Paul Eggert, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Eli Zaretskii, 2016/08/29
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Paul Eggert, 2016/08/30
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Eli Zaretskii, 2016/08/30
- Re: [PATCH] Enable customisation for electric-quote-mode chars, Richard Stallman, 2016/08/31
- tarball builds (was: [PATCH] Enable customisation for electric-quote-mode chars), Stefan Monnier, 2016/08/30