GNU bug report logs - #21588
25.0.50: Single quotes becoming curvy quotes in message function

Previous Next

Package: emacs;

Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>

Date: Tue, 29 Sep 2015 21:18:02 UTC

Severity: normal

Merged with 31597

Found in versions 25.0.50, 27.0.50

Done: Kaushal Modi <kaushal.modi <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 21588-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Kaushal Modi <kaushal.modi <at> gmail.com>, Glenn Morris <rgm <at> gnu.org>,
 21588-done <at> debbugs.gnu.org
Cc: Alan Mackenzie <acm <at> muc.de>, Eli Zaretskii <eliz <at> gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#21588: 25.0.50: Single quotes becoming curvy quotes in
 message function
Date: Wed, 30 Sep 2015 15:40:53 -0700
Kaushal Modi wrote:
> It doesn't feel right that (message "'Hey'") gets displayed as ’Hey’.

This shouldn't happen if your ~/.emacs has (setq text-quoting-style 
'grave) or (setq text-quoting-style 'straight), so I assume the issue 
came up because your text-quoting-style is ‘curve’ or defaults to ‘curve’.

The initial version of the ‘curve’ code behaved as you suggested, and 
left isolated apostrophes alone.  But as Dmitry pointed out, apostrophe 
in English is represented by right single quotation mark as standard 
typographic practice in fonts with directed quotes.  In traditional 
Emacs usage most isolated apostrophes in docstrings and diagnostics are 
English apostrophes, so it seemed appropriate to default to 
transliterating them as in English, of course with an escape hatch for 
the exceptions intended to be straight apostrophes.  So I changed the 
code to translate all non-escaped apostrophes.  This simplified the 
transformation rules, which was also a win.

Although there were a few diagnostics in Elisp that quoted English 
phrases 'like this', as I recall RMS said that directed quotes were 
preferred, so I fixed the instances I found to quote `like this' in 
message format strings.  Undoubtedly I missed some instances and so some 
minor display glitches remain, but they can be fixed as they turn up.

To get typewriter-style straight quoting in your own code, independent 
of text-quoting-style, you can write (message "%s" "'Hey'").




This bug report was last modified 6 years and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.