I agree that the typewriter
quotes (straight quotes or apostrophes as I have been referring in my emails)
being simple and portable; the user does not need to think of whether to enter ` or '. But then the default value of text-quoting-style as 'grave makes more sense. We would not want unwarned people using (message "'Hey'") in default emacs sessions be faced with the
’Hey’ with unbalanced quotes.
If we want to keep the default of text-quoting-style as nil (or 'curve), more logic needs to be added that decides whether left curly quote or right curly quote should be used, which might have some performance impact as we then need to check what the previous character is, what the next character is, etc to decide if the current apostrophe needs to be replaced with a left or a right quote.
Here are
few common cases that I can think of
:
CASE 2: it's awesome ->
it
’s awesome
CASE 3: my sisters' weddings ->
sisters
’ weddings
CASE 4: He said 'It's awesome!' ->
He said ‘It’s awesome!’ (It should have rather been -- He said "It's awesome!" (use of double quotes). But I am just putting here all the apostrophe cases I can think of..)
Based on above cases,
The apostrophe is replaced with left quote if,
(AND there's a non-space character after the apostrophe
(OR the apostrophe is first character in the line
there's white space before the apostrophe))
The apostrophe is replaced with right quote if,
there's a non-space character before
the apostrophe
OR, probably..
If
there's a non-space character before
the apostrophe, replace it with right quote, else use left quote.
I am by no means a literature or typography expert. So I am sure that the above 4 cases are not enough to define the rules for left/right quotes. I just wanted to emphasize that we need more intelligence in deciding which quote to use if we want to keep the 'curly or nil as the default value of text-quoting-style.
--
Kaushal Modi