diff options
| author | Alan Mackenzie | 2017-09-22 21:52:03 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2017-10-01 11:27:16 +0000 |
| commit | 5f76ac150a28e4de940790f96f0f751c8ee5d4c7 (patch) | |
| tree | c5bcacf053fcb197638073f3f167719831f17ff8 /src | |
| parent | d5e4e004fa134cb81989bcf40c5d6c79b837301f (diff) | |
| download | emacs-5f76ac150a28e4de940790f96f0f751c8ee5d4c7.tar.gz emacs-5f76ac150a28e4de940790f96f0f751c8ee5d4c7.zip | |
Make the value nil in text-quoting-style mean what it does in Emacs 25.
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc.c | 36 |
1 files changed, 16 insertions, 20 deletions
| @@ -690,9 +690,8 @@ enum text_quoting_style | |||
| 690 | text_quoting_style (void) | 690 | text_quoting_style (void) |
| 691 | { | 691 | { |
| 692 | if (NILP (Vtext_quoting_style) | 692 | if (NILP (Vtext_quoting_style) |
| 693 | || (EQ (Vtext_quoting_style, Qt) | 693 | ? default_to_grave_quoting_style () |
| 694 | ? default_to_grave_quoting_style () | 694 | : EQ (Vtext_quoting_style, Qgrave)) |
| 695 | : EQ (Vtext_quoting_style, Qgrave))) | ||
| 696 | return GRAVE_QUOTING_STYLE; | 695 | return GRAVE_QUOTING_STYLE; |
| 697 | else if (EQ (Vtext_quoting_style, Qstraight)) | 696 | else if (EQ (Vtext_quoting_style, Qstraight)) |
| 698 | return STRAIGHT_QUOTING_STYLE; | 697 | return STRAIGHT_QUOTING_STYLE; |
| @@ -1019,25 +1018,22 @@ syms_of_doc (void) | |||
| 1019 | Vbuild_files = Qnil; | 1018 | Vbuild_files = Qnil; |
| 1020 | 1019 | ||
| 1021 | DEFVAR_LISP ("text-quoting-style", Vtext_quoting_style, | 1020 | DEFVAR_LISP ("text-quoting-style", Vtext_quoting_style, |
| 1022 | doc: /* How to translate single quotes in help and messages. | 1021 | doc: /* Style to use for single quotes in help and messages. |
| 1023 | Its value should be a symbol, and describes the style of quote | 1022 | Its value should be a symbol. It works by substituting certain single |
| 1024 | substituted for ASCII quote characters GRAVE ACCENT (\\=`, \\=\\x60) and | 1023 | quotes for grave accent and apostrophe. This is done in help output |
| 1025 | APOSTROPHE (\\=', \\=\\x27). This is done in help output and in functions | 1024 | and in functions like `message' and `format-message'. It is not done |
| 1026 | like `message' and `format-message'. It is not done in `format'. | 1025 | in `format'. |
| 1027 | 1026 | ||
| 1028 | The value nil means do not translate the quotes at all. The value t | 1027 | `curve' means quote with curved single quotes ‘like this’. |
| 1029 | (the default) acts like `curve' if curved single quotes appear to be | 1028 | `straight' means quote with straight apostrophes \\='like this\\='. |
| 1030 | displayable, and like nil otherwise. `curve' means quote with curved | 1029 | `grave' means quote with grave accent and apostrophe \\=`like this\\='; |
| 1031 | single quotes ‘like this’. `straight' means quote with apostrophes | 1030 | i.e., do not alter quote marks. The default value nil acts like |
| 1032 | \\='like this\\='. `grave' means do not translate quote marks and is | 1031 | `curve' if curved single quotes are displayable, and like `grave' |
| 1033 | now a synonym for nil. | 1032 | otherwise. */); |
| 1034 | 1033 | Vtext_quoting_style = Qnil; | |
| 1035 | (The value t was newly introduced in Emacs 26, and in Emacs 25 nil | ||
| 1036 | meant what t means now.) */); | ||
| 1037 | Vtext_quoting_style = Qt; | ||
| 1038 | 1034 | ||
| 1039 | DEFVAR_BOOL ("internal--text-quoting-flag", text_quoting_flag, | 1035 | DEFVAR_BOOL ("internal--text-quoting-flag", text_quoting_flag, |
| 1040 | doc: /* If nil, a `text-quoting-style' value t is treated as `nil'. */); | 1036 | doc: /* If nil, a nil `text-quoting-style' is treated as `grave'. */); |
| 1041 | /* Initialized by ‘main’. */ | 1037 | /* Initialized by ‘main’. */ |
| 1042 | 1038 | ||
| 1043 | defsubr (&Sdocumentation); | 1039 | defsubr (&Sdocumentation); |