all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Alan Mackenzie <acm@muc.de>, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: text-quoting-style
Date: Fri, 28 Aug 2015 10:48:10 -0700	[thread overview]
Message-ID: <55E09EDA.3080001@cs.ucla.edu> (raw)
In-Reply-To: <20150828172501.GB4882@acm.fritz.box>

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

Alan Mackenzie wrote:
> The reason for its existence still holds.  Or is there some other
> mechanism which achieves the same thing?

I suggested the mechanism of setting the locale, which is needed anyway in an 
environment that can't display non-ASCII characters.  That is, curved quote 
characters would still be transformed to grave accent and apostrophe in the 
*Help* buffers, which I think was your main goal; it's just that the 
text-quoting-style variable wouldn't be needed.

Something like the attached change to the manual, say, with corresponding 
changes elsewhere.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: doc.diff --]
[-- Type: text/x-diff; name="doc.diff", Size: 2983 bytes --]

diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 44c09a2..fdd0a32 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -335,18 +335,17 @@ and @samp{\=\=} puts @samp{\=} into the output.
 @strong{Please note:} Each @samp{\} must be doubled when written in a
 string in Emacs Lisp.
 
-@defvar text-quoting-style
 @cindex curved quotes
 @cindex curly quotes
-The value of this variable specifies the style used to generate text
-quotes.  If the variable's value is @code{curve}, the style is
-@t{‘like this’} with curved single quotes.  If the value is
-@code{straight}, the style is @t{'like this'} with straight
-apostrophes.  If the value is @code{grave}, the style is @t{`like
-this'} with grave accent and apostrophe.  The default value @code{nil}
-acts like @code{curve} if curved single quotes are displayable, and
-like @code{grave} otherwise.
-@end defvar
+@cindex @env{LC_ALL} environment variable
+Docstrings can represent directed single quotes with
+either curved quotes (@t{‘} and @t{’}) or with grave accent and
+apostrophe (@t{`} and @t{'}).  These are transformed to curved single
+quotes if displayable, and to grave accent and apostrophe otherwise.
+Most modern displays can represent curved quotes with no trouble; for
+the exceptions, you can run Emacs in a locale that matches your
+display, e.g., by setting @env{LC_ALL} to @samp{C} in the environment.
+@xref{Locales}.
 
 @defun substitute-command-keys string
 This function scans @var{string} for the above special sequences and
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 08e8e87..3705546 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -818,11 +818,12 @@ if any.
 @defun format-message string &rest objects
 @cindex curved quotes
 @cindex curly quotes
-This function acts like @code{format}, except it also converts any
-curved single quotes in @var{string} as per the value of
-@code{text-quoting-style}, and treats grave accent (@t{`}) and
-apostrophe (@t{'}) as if they were curved single quotes.  @xref{Keys
-in Documentation}.
+This function acts like @code{format}, except it also replaces grave
+accents and apostrophes (@t{`} and @t{'}) in @var{string} with curved
+quotes (@t{‘} and @t{’}) if curved quotes are displayable, and
+replaces curved quotes with grave accents and apostrophes if curved
+quotes are not displayable.  This extra replacement is similar to what
+@code{substitute-command-keys} does.  @xref{Keys in Documentation}.
 @end defun
 
 @cindex @samp{%} in format
@@ -923,8 +924,7 @@ specification is unusual in that it does not use a value.  For example,
   Any other format character results in an @samp{Invalid format
 operation} error.
 
-  Here are several examples, which assume the typical
-@code{text-quoting-style} settings:
+  Here are several examples, which assume curved quotes are displayable:
 
 @example
 @group

  reply	other threads:[~2015-08-28 17:48 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28  2:03 text-quoting-style Stefan Monnier
2015-08-28  5:22 ` text-quoting-style David Kastrup
2015-08-28  7:06 ` text-quoting-style Paul Eggert
2015-08-28  7:37   ` text-quoting-style Eli Zaretskii
2015-08-28  7:54     ` text-quoting-style Paul Eggert
2015-08-28  8:42       ` text-quoting-style Eli Zaretskii
2015-08-28 14:39         ` text-quoting-style Yuri Khan
2015-08-28 14:49           ` text-quoting-style Eli Zaretskii
2015-08-28 15:00         ` text-quoting-style Paul Eggert
2015-08-28 15:31           ` text-quoting-style Eli Zaretskii
2015-08-28 15:39             ` text-quoting-style Paul Eggert
2015-08-28 15:48               ` text-quoting-style Eli Zaretskii
2015-08-28  7:29 ` text-quoting-style Eli Zaretskii
2015-08-28 16:42   ` text-quoting-style Stefan Monnier
2015-08-28 17:25     ` text-quoting-style Alan Mackenzie
2015-08-28 17:48       ` Paul Eggert [this message]
2015-08-28 18:28         ` text-quoting-style Alan Mackenzie
2015-08-29 14:54       ` text-quoting-style Stefan Monnier
2015-08-29 15:59         ` text-quoting-style Alan Mackenzie
2015-08-30  1:59           ` text-quoting-style Stefan Monnier
2015-08-30 13:16             ` text-quoting-style Alan Mackenzie
2015-08-31  1:30               ` text-quoting-style Stefan Monnier
2015-08-31  6:29                 ` text-quoting-style Paul Eggert
2015-08-31 20:13                   ` text-quoting-style Alan Mackenzie
2015-08-31 21:29                     ` text-quoting-style Paul Eggert
2015-09-01 12:47                       ` text-quoting-style Alan Mackenzie
2015-09-01 16:27                         ` text-quoting-style Paul Eggert
2015-09-01 17:07                           ` text-quoting-style David Kastrup
2015-09-01 18:35                           ` text-quoting-style Alan Mackenzie
2015-09-01 23:58                             ` text-quoting-style Paul Eggert
2015-09-02  9:09                               ` text-quoting-style Alan Mackenzie
2015-09-02 15:13                                 ` text-quoting-style Paul Eggert
2015-09-01 18:44                           ` text-quoting-style Eli Zaretskii
2015-09-01 19:08                             ` text-quoting-style Paul Eggert
2015-09-01 13:46                       ` text-quoting-style David Kastrup
2015-09-01 16:28                         ` text-quoting-style Paul Eggert
2015-09-01 17:08                           ` text-quoting-style David Kastrup
2015-09-01 17:34                             ` text-quoting-style Paul Eggert
2015-09-01 18:30                               ` text-quoting-style David Kastrup
2015-09-02  0:07                                 ` text-quoting-style Paul Eggert
2015-09-02  0:27                                   ` text-quoting-style David Kastrup
2015-09-02 15:35                               ` text-quoting-style Richard Stallman
2015-08-31 20:01                 ` text-quoting-style Alan Mackenzie
2015-09-01  3:31                   ` text-quoting-style Stefan Monnier
2015-09-01  9:28                     ` text-quoting-style Dmitry Gutov
2015-09-01 10:53                       ` text-quoting-style Oleh Krehel
2015-09-01 13:03                     ` text-quoting-style Alan Mackenzie
2015-09-01 16:46                       ` text-quoting-style Stefan Monnier
2015-09-01 20:41                         ` text-quoting-style Bastien
2015-09-01 23:47                           ` text-quoting-style Paul Eggert
2015-09-02  0:18                             ` text-quoting-style David Kastrup
2015-09-02  0:35                               ` text-quoting-style Paul Eggert
2015-09-02  0:53                                 ` text-quoting-style David Kastrup
2015-09-02  6:57                             ` text-quoting-style Bastien
2015-09-02 15:17                               ` text-quoting-style Paul Eggert
2015-09-02 15:36                                 ` text-quoting-style Dmitry Gutov
2015-09-02 15:41                                 ` text-quoting-style Bastien Guerry
2015-09-01 22:55                     ` text-quoting-style Richard Stallman
2015-09-02  9:05                       ` text-quoting-style Alan Mackenzie
2015-08-31 16:10       ` text-quoting-style N. Jackson
2015-08-31 17:31         ` text-quoting-style Stefan Monnier
2015-09-02 19:34           ` text-quoting-style N. Jackson
2015-09-03 15:29             ` text-quoting-style raman
2015-08-31  6:15     ` text-quoting-style Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E09EDA.3080001@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=acm@muc.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.