aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2015-08-24 23:37:18 -0700
committerPaul Eggert2015-08-24 23:57:21 -0700
commit68280c5ee9b87d874ffa7c111b3cac7e634cee22 (patch)
tree955f3f692c7254074cac682c4e7e64b6f1361a35 /doc
parent0db4992d2778a2da4dee8ca07cde8c5e206f5250 (diff)
downloademacs-68280c5ee9b87d874ffa7c111b3cac7e634cee22.tar.gz
emacs-68280c5ee9b87d874ffa7c111b3cac7e634cee22.zip
Treat ' like ’ even when not matching `
This is simpler and easier to explain, and should encourage better typography. Do this in Electric Quote mode and when translating quotes in docstrings. Inspired by a suggestion by Dmitry Gutov in: https://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00806.html * doc/emacs/text.texi (Quotation Marks): * doc/lispref/help.texi (Keys in Documentation): * etc/NEWS: Document this. * lisp/electric.el (electric-quote-post-self-insert-function): * src/doc.c (Fsubstitute_command_keys): Always treat ' like ’ even when not matched by an open quote.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/text.texi12
-rw-r--r--doc/lispref/help.texi20
2 files changed, 9 insertions, 23 deletions
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 5a13f208876..31760b70b4c 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -420,13 +420,11 @@ left and right single or double quotation marks @t{‘like this’} or
420@t{“like this”}. Typewriter quotes are simple and portable; curved 420@t{“like this”}. Typewriter quotes are simple and portable; curved
421quotes are less ambiguous and typically look nicer. 421quotes are less ambiguous and typically look nicer.
422 422
423 Electric Quote mode makes it easier to type curved quotes. It 423 Electric Quote mode makes it easier to type curved quotes. As you
424optionally converts a quotation's grave accent and apostrophe @t{`like 424type characters it optionally converts @t{`} to @t{‘}, @t{'} to @t{’},
425this'} to single quotation marks @t{‘like this’}. Similarly, it 425@t{``} to @t{“}, and @t{''} to @t{”}. These conversions are
426converts a quotation's double grave accent and double apostrophe 426suppressed in buffers whose coding systems cannot represent curved
427@t{``like this''} to double quotation marks @t{“like this”}. These 427quote characters.
428conversions are suppressed in buffers whose coding systems cannot
429represent curved quote characters.
430 428
431@vindex electric-quote-paragraph 429@vindex electric-quote-paragraph
432@vindex electric-quote-comment 430@vindex electric-quote-comment
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index ab884f8dc80..44c09a2085a 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -318,25 +318,13 @@ stands for no text itself. It is used only for a side effect: it
318specifies @var{mapvar}'s value as the keymap for any following 318specifies @var{mapvar}'s value as the keymap for any following
319@samp{\[@var{command}]} sequences in this documentation string. 319@samp{\[@var{command}]} sequences in this documentation string.
320 320
321@item `
322(grave accent) stands for a left quote, and alters the interpretation
323of the next unmatched apostrophe.
324
325@item '
326(apostrophe) stands for a right quote if preceded by grave accent and
327there are no intervening apostrophes. Otherwise, apostrophe stands
328for itself.
329
330@item ‘ 321@item ‘
331(left single quotation mark) stands for a left quote. 322@itemx `
323(left single quotation mark and grave accent) both stand for a left quote.
332 324
333@item ’ 325@item ’
334(right single quotation mark) stands for a right quote. 326@itemx '
335 327(right single quotation mark and apostrophe) both stand for a right quote.
336@item '
337(apostrophe) stands for a right quote if
338preceded by grave accent and there are no intervening apostrophes.
339Otherwise, apostrophe stands for itself.
340 328
341@item \= 329@item \=
342quotes the following character and is discarded; thus, @samp{\=`} puts 330quotes the following character and is discarded; thus, @samp{\=`} puts