* lisp/help-fns.el (describe-function-1): Don't set coding system to UTF-8
when text-quoting-style is `leave'.
* src/lisp.h (enum text_quoting_style): Add identifier LEAVE_QUOTING_STYLE.
* src/doc.c (syms_of_doc): New symbol "leave". Amend doc string of
`text_quoting_style'.
(text_quoting_style): Handle `leave' by returning LEAVE_QUOTING_STYLE.
(Fsubstitute_command_keys): Don't translate quotes when quoting_style is
LEAVE_QUOTING_STYLE.
* src/editfns.c (styled_format): Set quoting_style to -1 when
text-quoting-style is `leave'.
;; Avoid asking the user annoying questions if she decides
;; to save the help buffer, when her locale's codeset
;; isn't UTF-8.
;; Avoid asking the user annoying questions if she decides
;; to save the help buffer, when her locale's codeset
;; isn't UTF-8.
- (unless (memq text-quoting-style '(straight grave))
+ (unless (memq text-quoting-style '(leave straight grave))
(set-buffer-file-coding-system 'utf-8))))))))
;; Add defaults to `help-fns-describe-function-functions'.
(set-buffer-file-coding-system 'utf-8))))))))
;; Add defaults to `help-fns-describe-function-functions'.
? default_to_grave_quoting_style ()
: EQ (Vtext_quoting_style, Qgrave))
return GRAVE_QUOTING_STYLE;
? default_to_grave_quoting_style ()
: EQ (Vtext_quoting_style, Qgrave))
return GRAVE_QUOTING_STYLE;
+ else if (EQ (Vtext_quoting_style, Qleave))
+ return LEAVE_QUOTING_STYLE;
else if (EQ (Vtext_quoting_style, Qstraight))
return STRAIGHT_QUOTING_STYLE;
else
else if (EQ (Vtext_quoting_style, Qstraight))
return STRAIGHT_QUOTING_STYLE;
else
int ch = STRING_CHAR_AND_LENGTH (strp, len);
if ((ch == LEFT_SINGLE_QUOTATION_MARK
|| ch == RIGHT_SINGLE_QUOTATION_MARK)
int ch = STRING_CHAR_AND_LENGTH (strp, len);
if ((ch == LEFT_SINGLE_QUOTATION_MARK
|| ch == RIGHT_SINGLE_QUOTATION_MARK)
- && quoting_style != CURVE_QUOTING_STYLE)
+ && quoting_style != CURVE_QUOTING_STYLE
+ && quoting_style != LEAVE_QUOTING_STYLE)
{
*bufp++ = ((ch == LEFT_SINGLE_QUOTATION_MARK
&& quoting_style == GRAVE_QUOTING_STYLE)
{
*bufp++ = ((ch == LEFT_SINGLE_QUOTATION_MARK
&& quoting_style == GRAVE_QUOTING_STYLE)
syms_of_doc (void)
{
DEFSYM (Qfunction_documentation, "function-documentation");
syms_of_doc (void)
{
DEFSYM (Qfunction_documentation, "function-documentation");
+ DEFSYM (Qleave, "leave");
DEFSYM (Qgrave, "grave");
DEFSYM (Qstraight, "straight");
DEFSYM (Qgrave, "grave");
DEFSYM (Qstraight, "straight");
DEFVAR_LISP ("text-quoting-style", Vtext_quoting_style,
doc: /* Style to use for single quotes in help and messages.
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 certain other single quotes. This is done in help output and
+`message' output. It is not done in `format'.
+
+`leave' means do not do any substitutions.
`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\\='.
`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\\='.
multibyte = true;
int quoting_style = message ? text_quoting_style () : -1;
multibyte = true;
int quoting_style = message ? text_quoting_style () : -1;
+ if (quoting_style == LEAVE_QUOTING_STYLE)
+ quoting_style = -1;
/* If we start out planning a unibyte result,
then discover it has to be multibyte, we jump back to retry. */
/* If we start out planning a unibyte result,
then discover it has to be multibyte, we jump back to retry. */
/* Defined in doc.c. */
enum text_quoting_style
{
/* Defined in doc.c. */
enum text_quoting_style
{
+ /* Leave quotes unchanged. */
+ LEAVE_QUOTING_STYLE,
+
/* Use curved single quotes ‘like this’. */
CURVE_QUOTING_STYLE,
/* Use curved single quotes ‘like this’. */
CURVE_QUOTING_STYLE,