]> git.eshelyaron.com Git - emacs.git/commitdiff
Make the value nil in text-quoting-style mean what it does in Emacs 25.
authorAlan Mackenzie <acm@muc.de>
Fri, 22 Sep 2017 21:52:03 +0000 (21:52 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 22 Sep 2017 21:52:03 +0000 (21:52 +0000)
This is a partial reversion of yesterday's commit by the same author, which
changed the meaning of nil and introduced the new value t.

* src/doc.c (text_quoting_style, text-quoting-style)
(internal--text-quoting-flag): Revert yesterday's changes.

* lisp/cus-start.el: (top level): Amend the entry for text-quoting-style.

* etc/NEWS: Amend the entry for text-quoting-style.

* doc/lispref/control.texi (Signalling Errors)
* doc/lispref/display.texi (Displaying Messages)
* doc/lispref/strings.texi (Formatting Strings): Bind text-quoting-style to
grave rather than nil to inhibit translation of quotes.

* doc/lispref/help.texi (Keys in Documentation): Revert the description of the
proposed new default, t.

doc/lispref/control.texi
doc/lispref/display.texi
doc/lispref/help.texi
doc/lispref/strings.texi
etc/NEWS
lisp/cus-start.el
src/doc.c

index 09435f579665e04c5a259a61b3c52df53b55a4ea..c39e035459ea7ff76c1ca1802977bc307f7c878b 100644 (file)
@@ -1109,7 +1109,7 @@ quotes.  In contrast, a call using a format like @t{"Missing '%s'"}
 with only apostrophes typically generates a message like @t{"Missing
 ’foo’"} with only closing curved quotes, an unusual style in English.
 One way around this problem is to bind @code{text-quoting-style} to
-@code{nil} around the call to @code{error}; this causes the
+the symbol @code{grave} around the call to @code{error}; this causes
 @acronym{ASCII} quote characters to be output unchanged.
 
 @strong{Warning:} If you want to use your own string as an error message
index 8f58fca506f915f88c9414162c1c5641df6abcf7..62b136f6c60262c9b730b64b095804675cc26705 100644 (file)
@@ -273,7 +273,7 @@ quotes.  In contrast, a call using a format like @t{"Missing '%s'"}
 with only apostrophes typically generates a message like @t{"Missing
 ’foo’"} with only closing curved quotes, an unusual style in English.
 One way around this problem is to bind @code{text-quoting-style} to
-@code{nil} around calls to @code{message}; this causes the
+the symbol @code{grave} around calls to @code{message}; this causes
 @acronym{ASCII} quote characters to be output unchanged.
 
 In batch mode, the message is printed to the standard error stream,
index e1e98124e08480aedd850e401b3a1c1778e32880..74dc6dac9cb7dc06e2bced070af061814504f531 100644 (file)
@@ -359,11 +359,11 @@ should use for single quotes in the wording of help and messages.  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{nil} or @code{grave}, quotes are not translated and the style is
-@t{`like this'} with grave accent and apostrophe, the standard style
-before Emacs version 25.  The default value @code{t} acts like
-@code{curve} if curved single quotes seem to be displayable, and like
-@code{nil} otherwise.
+@code{grave}, quotes are not translated and the style is @t{`like
+this'} with grave accent and apostrophe, the standard style before
+Emacs version 25.  The default value @code{nil} acts like @code{curve}
+if curved single quotes seem to be displayable, and like @code{grave}
+otherwise.
 
 This option is useful on platforms that have problems with curved
 quotes.  You can customize it freely according to your personal
index 117a373a190d443dd9cb797ed0e36a151e21b8e0..10385e0550151ecabe6b8c0864e2906c9ee8725e 100644 (file)
@@ -836,10 +836,10 @@ this'} typically generates curved quotes @t{‘like this’}.  In
 contrast, a format that quotes with only apostrophes @t{'like this'}
 typically generates two closing curved quotes @t{’like this’}, an
 unusual style in English.  One way around such problems is to bind
-@code{text-quoting-style} to @code{nil} around calls to
-@code{format-message}; this causes the @acronym{ASCII} quoting
-characters to be output unchanged.  @xref{Keys in Documentation}, for
-how the @code{text-quoting-style} variable affects generated quotes.
+@code{text-quoting-style} to the symbol @code{grave} around calls to
+@code{format-message}; this causes @acronym{ASCII} quoting characters
+to be output unchanged.  @xref{Keys in Documentation}, for how the
+@code{text-quoting-style} variable affects generated quotes.
 @end defun
 
 @cindex @samp{%} in format
index f19872e9717f85bef30a5dc39b94fcd1b4333a60..755893b9b5c6a4e4f75f9f23a79bccea844d0f32 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1231,15 +1231,13 @@ change FOO, respectively.  The exhaustive list of removed variables is:
 *** Many variables obsoleted in 22.1 referring to face symbols
 
 +++
-** The variable `text-quoting-style' is now a customizable option.  It
+** The variable 'text-quoting-style' is now a customizable option.  It
 controls whether to and how to translate ASCII quotes in messages and
-help output.  The value nil now means "no translation", and the value
-t, the default, means "use curved quotes if displayable" (as nil did
-in Emacs 25).  The other possible values remain unchanged.
-`text-quoting-style' no longer affects the treatment of curved quotes
-in format arguments to functions like `message' and `format-message'.
-In particular, when this variable's value is `grave', all quotes in
-formats are output as-is.
+help output.  Its possible values and their semantics remain unchanged
+from Emacs 25, except that 'text-quoting-style' no longer affects the
+treatment of curved quotes in format arguments to functions like
+'message' and 'format-message'.  In particular, when this variable's
+value is 'grave', all quotes in formats are output as-is.
 
 ---
 ** Functions like 'check-declare-file' and 'check-declare-directory'
index effd7bd5d6d040b7f28c7f4535f5f1e53551e520..f6837276646d9a7dea5b09ee38ca970d31cbfd94 100644 (file)
@@ -226,11 +226,10 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
              ;; doc.c
              (text-quoting-style display
                                  (choice
-                                  (const :tag "No translation" nil)
-                                  (const :tag "Prefer \\=‘curved\\=’ quotes, if possible" t)
+                                  (const :tag "Prefer \\=‘curved\\=’ quotes, if possible" nil)
                                   (const :tag "\\=‘Curved\\=’ quotes" curved)
                                   (const :tag "\\='Straight\\=' quotes" straight)
-                                  (const :tag "\\=`Grave\\=' quotes" grave)))
+                                  (const :tag "\\=`Grave\\=' quotes (no translation)" grave)))
 
              ;; dosfns.c
             (dos-display-scancodes display boolean)
index e2af39ef07f057dcff2b0a24a5f0d3baa0563e1d..3286c12675a2f43fcec3e64a80bfb118c4e7406a 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -690,9 +690,8 @@ enum text_quoting_style
 text_quoting_style (void)
 {
   if (NILP (Vtext_quoting_style)
-      || (EQ (Vtext_quoting_style, Qt)
-          ? default_to_grave_quoting_style ()
-          : EQ (Vtext_quoting_style, Qgrave)))
+      ? default_to_grave_quoting_style ()
+      : EQ (Vtext_quoting_style, Qgrave))
     return GRAVE_QUOTING_STYLE;
   else if (EQ (Vtext_quoting_style, Qstraight))
     return STRAIGHT_QUOTING_STYLE;
@@ -1019,25 +1018,22 @@ syms_of_doc (void)
   Vbuild_files = Qnil;
 
   DEFVAR_LISP ("text-quoting-style", Vtext_quoting_style,
-               doc: /* How to translate single quotes in help and messages.
-Its value should be a symbol, and describes the style of quote
-substituted for ASCII quote characters GRAVE ACCENT (\\=`, \\=\\x60) and
-APOSTROPHE (\\=', \\=\\x27).  This is done in help output and in functions
-like `message' and `format-message'.  It is not done in `format'.
-
-The value nil means do not translate the quotes at all.  The value t
-(the default) acts like `curve' if curved single quotes appear to be
-displayable, and like nil otherwise.  `curve' means quote with curved
-single quotes ‘like this’.  `straight' means quote with apostrophes
-\\='like this\\='.  `grave' means do not translate quote marks and is
-now a synonym for nil.
-
-(The value t was newly introduced in Emacs 26, and in Emacs 25 nil
-meant what t means now.)  */);
-  Vtext_quoting_style = Qt;
+               doc: /* Style to use for single quotes in help and messages.
+Its value should be a symbol.  It works by substituting certain single
+quotes for grave accent and apostrophe.  This is done in help output
+and in functions like `message' and `format-message'.  It is not done
+in `format'.
+
+`curve' means quote with curved single quotes ‘like this’.
+`straight' means quote with straight apostrophes \\='like this\\='.
+`grave' means quote with grave accent and apostrophe \\=`like this\\=';
+i.e., do not alter quote marks.  The default value nil acts like
+`curve' if curved single quotes are displayable, and like `grave'
+otherwise.  */);
+  Vtext_quoting_style = Qnil;
 
   DEFVAR_BOOL ("internal--text-quoting-flag", text_quoting_flag,
-              doc: /* If nil, a `text-quoting-style' value t is treated as `nil'.  */);
+              doc: /* If nil, a nil `text-quoting-style' is treated as `grave'.  */);
   /* Initialized by ‘main’.  */
 
   defsubr (&Sdocumentation);