]> code.delx.au - gnu-emacs/blobdiff - src/doc.c
* src/fileio.c (auto_save_error): Use display-warning. (Bug#23703)
[gnu-emacs] / src / doc.c
index e1f508e5014b06665eb7b8bb22e9936553c5d677..017dd173d0ace2f58cb5cc5392960601143a7f17 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -980,28 +980,12 @@ Otherwise, return a new string.  */)
          nchars++;
          changed = true;
        }
-      else if (! multibyte)
-       *bufp++ = *strp++, nchars++;
       else
        {
-         int len;
-         int ch = STRING_CHAR_AND_LENGTH (strp, len);
-         if ((ch == LEFT_SINGLE_QUOTATION_MARK
-              || ch == RIGHT_SINGLE_QUOTATION_MARK)
-             && quoting_style != CURVE_QUOTING_STYLE)
-           {
-             *bufp++ = ((ch == LEFT_SINGLE_QUOTATION_MARK
-                         && quoting_style == GRAVE_QUOTING_STYLE)
-                        ? '`' : '\'');
-             strp += len;
-             changed = true;
-           }
-         else
-           {
-             do
-               *bufp++ = *strp++;
-             while (--len != 0);
-           }
+         *bufp++ = *strp++;
+         if (multibyte)
+           while (! CHAR_HEAD_P (*strp))
+             *bufp++ = *strp++;
          nchars++;
        }
     }
@@ -1046,12 +1030,17 @@ syms_of_doc (void)
 
   DEFVAR_LISP ("text-quoting-style", Vtext_quoting_style,
                doc: /* Style to use for single quotes in help and messages.
-Its value should be a symbol.
+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\\='.
-The default value nil acts like `curve' if curved single quotes are
-displayable, and like `grave' otherwise.  */);
+`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,