diff options
| author | Paul Eggert | 2015-06-17 23:50:45 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-06-17 23:51:11 -0700 |
| commit | 84085e36a4765d2396c04da246b796a6f5fa7a49 (patch) | |
| tree | 2597b5f8a4063cae3448811e1c275260e6a92c25 | |
| parent | dbc192b4c239c2da8c83def0b0a877d7f179172a (diff) | |
| download | emacs-84085e36a4765d2396c04da246b796a6f5fa7a49.tar.gz emacs-84085e36a4765d2396c04da246b796a6f5fa7a49.zip | |
Document curved quotes a bit better
* doc/emacs/basic.texi (Inserting Text):
Mention C-x 8. Change example to use curved quote rather
than infinity, as this lets us give more ways to do it.
* doc/emacs/mule.texi (International Chars): Mention C-x 8 shortcuts
and quotation marks.
* doc/emacs/text.texi (Quotation Marks):
* doc/lispref/tips.texi (Documentation Tips):
Add "curly quotes" and "curved quotes" to the index.
* doc/emacs/text.texi (Quotation Marks):
Give the C-x 8 shorthands for curved quotes.
Cross-reference to "Quotation Marks".
| -rw-r--r-- | doc/emacs/basic.texi | 39 | ||||
| -rw-r--r-- | doc/emacs/mule.texi | 7 | ||||
| -rw-r--r-- | doc/emacs/text.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/tips.texi | 12 |
4 files changed, 45 insertions, 18 deletions
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index cc9602e8c52..0a4391094b3 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi | |||
| @@ -104,10 +104,22 @@ the letters @kbd{a} to @kbd{f} serve as part of a character code, | |||
| 104 | just like digits. Case is ignored. | 104 | just like digits. Case is ignored. |
| 105 | 105 | ||
| 106 | @findex insert-char | 106 | @findex insert-char |
| 107 | @kindex C-x 8 RET | 107 | @kindex C-x 8 |
| 108 | @cindex Unicode characters, inserting | 108 | @cindex Unicode characters, inserting |
| 109 | @cindex insert Unicode character | 109 | @cindex insert Unicode character |
| 110 | @cindex characters, inserting by name or code-point | 110 | @cindex characters, inserting by name or code-point |
| 111 | @cindex curly quotes | ||
| 112 | @cindex curved quotes | ||
| 113 | A few common Unicode characters can be inserted via a command | ||
| 114 | starting with @kbd{C-x 8}. For example, @kbd{C-x 8 [} inserts @t{‘} | ||
| 115 | which is Unicode code-point @code{U+2018} LEFT SINGLE QUOTATION MARK, | ||
| 116 | sometimes called a left single ``curved quote'' or ``curly quote''. | ||
| 117 | Similarly, @kbd{C-x 8 ]}, @kbd{C-x 8 @{} and @kbd{C-x 8 @}} insert the | ||
| 118 | curved quotes @t{’}, @t{“} and @t{”}, respectively. Also, a working | ||
| 119 | Alt key acts like @kbd{C-x 8}; e.g., @kbd{A-[} acts like @kbd{C-x 8 [} | ||
| 120 | and inserts @t{‘}. To see which characters have @kbd{C-x 8} | ||
| 121 | shorthands, type @kbd{C-x 8 C-h}. | ||
| 122 | |||
| 111 | Alternatively, you can use the command @kbd{C-x 8 @key{RET}} | 123 | Alternatively, you can use the command @kbd{C-x 8 @key{RET}} |
| 112 | (@code{insert-char}). This prompts for the Unicode name or code-point | 124 | (@code{insert-char}). This prompts for the Unicode name or code-point |
| 113 | of a character, using the minibuffer. If you enter a name, the | 125 | of a character, using the minibuffer. If you enter a name, the |
| @@ -116,16 +128,7 @@ code-point, it should be as a hexadecimal number (the convention for | |||
| 116 | Unicode), or a number with a specified radix, e.g., @code{#o23072} | 128 | Unicode), or a number with a specified radix, e.g., @code{#o23072} |
| 117 | (octal); @xref{Integer Basics,,, elisp, The Emacs Lisp Reference | 129 | (octal); @xref{Integer Basics,,, elisp, The Emacs Lisp Reference |
| 118 | Manual}. The command then inserts the corresponding character into | 130 | Manual}. The command then inserts the corresponding character into |
| 119 | the buffer. For example, both of the following insert the infinity | 131 | the buffer. |
| 120 | sign (Unicode code-point @code{U+221E}): | ||
| 121 | |||
| 122 | @example | ||
| 123 | @kbd{C-x 8 @key{RET} infinity @key{RET}} | ||
| 124 | @kbd{C-x 8 @key{RET} 221e @key{RET}} | ||
| 125 | @end example | ||
| 126 | |||
| 127 | A numeric argument to @kbd{C-q} or @kbd{C-x 8 @key{RET}} specifies | ||
| 128 | how many copies of the character to insert (@pxref{Arguments}). | ||
| 129 | 132 | ||
| 130 | In some contexts, if you type a quotation using grave accent and | 133 | In some contexts, if you type a quotation using grave accent and |
| 131 | apostrophe @t{`like this'}, it is converted to a form @t{‘like this’} | 134 | apostrophe @t{`like this'}, it is converted to a form @t{‘like this’} |
| @@ -133,6 +136,20 @@ using single quotation marks. Similarly, typing a quotation @t{``like | |||
| 133 | this''} using double grave accent and apostrophe converts it to a form | 136 | this''} using double grave accent and apostrophe converts it to a form |
| 134 | @t{“like this”} using double quotation marks. @xref{Quotation Marks}. | 137 | @t{“like this”} using double quotation marks. @xref{Quotation Marks}. |
| 135 | 138 | ||
| 139 | For example, the following all insert the same character: | ||
| 140 | |||
| 141 | @example | ||
| 142 | @kbd{C-x 8 @key{RET} left single quotation mark @key{RET}} | ||
| 143 | @kbd{C-x 8 @key{RET} left sin @key{TAB} @key{RET}} | ||
| 144 | @kbd{C-x 8 @key{RET} 2018 @key{RET}} | ||
| 145 | @kbd{C-x 8 [} | ||
| 146 | @kbd{A-[} @r{(if the Alt key works)} | ||
| 147 | @kbd{`} @r{(in Electric Quote mode)} | ||
| 148 | @end example | ||
| 149 | |||
| 150 | A numeric argument to @kbd{C-q} or @kbd{C-x 8 ...} specifies | ||
| 151 | how many copies of the character to insert (@pxref{Arguments}). | ||
| 152 | |||
| 136 | @node Moving Point | 153 | @node Moving Point |
| 137 | @section Changing the Location of Point | 154 | @section Changing the Location of Point |
| 138 | 155 | ||
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 80b1384feb6..5a166d13124 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -136,8 +136,11 @@ displayed on your terminal, they appear as @samp{?} or as hollow boxes | |||
| 136 | Keyboards, even in the countries where these character sets are | 136 | Keyboards, even in the countries where these character sets are |
| 137 | used, generally don't have keys for all the characters in them. You | 137 | used, generally don't have keys for all the characters in them. You |
| 138 | can insert characters that your keyboard does not support, using | 138 | can insert characters that your keyboard does not support, using |
| 139 | @kbd{C-q} (@code{quoted-insert}) or @kbd{C-x 8 @key{RET}} | 139 | @kbd{C-x 8 @key{RET}} (@code{insert-char}). @xref{Inserting Text}. |
| 140 | (@code{insert-char}). @xref{Inserting Text}. Emacs also supports | 140 | Shorthands are available for some common characters; for example, you |
| 141 | can insert a left single quotation mark @t{‘} by typing @kbd{C-x 8 | ||
| 142 | [}, or in Electric Quote mode often by simply typing @kbd{`}. | ||
| 143 | @xref{Quotation Marks}. Emacs also supports | ||
| 141 | various @dfn{input methods}, typically one for each script or | 144 | various @dfn{input methods}, typically one for each script or |
| 142 | language, which make it easier to type characters in the script. | 145 | language, which make it easier to type characters in the script. |
| 143 | @xref{Input Methods}. | 146 | @xref{Input Methods}. |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index d891cc16870..5a13f208876 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -410,6 +410,8 @@ beginning of a line. | |||
| 410 | @cindex Quotation marks | 410 | @cindex Quotation marks |
| 411 | @cindex Electric Quote mode | 411 | @cindex Electric Quote mode |
| 412 | @cindex mode, Electric Quote | 412 | @cindex mode, Electric Quote |
| 413 | @cindex curly quotes | ||
| 414 | @cindex curved quotes | ||
| 413 | @findex electric-quote-mode | 415 | @findex electric-quote-mode |
| 414 | One common way to quote is the typewriter convention, which quotes | 416 | One common way to quote is the typewriter convention, which quotes |
| 415 | using straight apostrophes @t{'like this'} or double-quotes @t{"like | 417 | using straight apostrophes @t{'like this'} or double-quotes @t{"like |
| @@ -443,7 +445,8 @@ variables. | |||
| 443 | @kbd{M-x electric-quote-local-mode}. To suppress it for a single use, | 445 | @kbd{M-x electric-quote-local-mode}. To suppress it for a single use, |
| 444 | type @kbd{C-q `} or @kbd{C-q '} instead of @kbd{`} or @kbd{'}. To | 446 | type @kbd{C-q `} or @kbd{C-q '} instead of @kbd{`} or @kbd{'}. To |
| 445 | insert a curved quote even when Electric Quote is disabled or | 447 | insert a curved quote even when Electric Quote is disabled or |
| 446 | inactive, use @kbd{C-x 8 @key{RET}} (@code{insert-char}). | 448 | inactive, you can type @kbd{C-x 8 [} for @t{‘}, @kbd{C-x 8 ]} for |
| 449 | @t{’}, @kbd{C-x 8 @{} for @t{“}, and @kbd{C-x 8 @}} for @t{”}. | ||
| 447 | @xref{Inserting Text}. | 450 | @xref{Inserting Text}. |
| 448 | 451 | ||
| 449 | @node Filling | 452 | @node Filling |
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 798b6700aac..9144497d5f1 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi | |||
| @@ -657,15 +657,19 @@ starting double-quote is not part of the string! | |||
| 657 | 657 | ||
| 658 | @anchor{Docstring hyperlinks} | 658 | @anchor{Docstring hyperlinks} |
| 659 | @item | 659 | @item |
| 660 | @cindex curly quotes | ||
| 661 | @cindex curved quotes | ||
| 660 | When a documentation string refers to a Lisp symbol, write it as it | 662 | When a documentation string refers to a Lisp symbol, write it as it |
| 661 | would be printed (which usually means in lower case), surrounding | 663 | would be printed (which usually means in lower case), surrounding |
| 662 | it with curved single quotes (@samp{‘} and @samp{’}). There are | 664 | it with curved single quotes (@t{‘} and @t{’}). There are |
| 663 | two exceptions: write @code{t} and @code{nil} without surrounding | 665 | two exceptions: write @code{t} and @code{nil} without surrounding |
| 664 | punctuation. For example: @samp{CODE can be ‘lambda’, nil, or t.} | 666 | punctuation. For example: @samp{CODE can be ‘lambda’, nil, or t}. |
| 667 | @xref{Quotation Marks,,, emacs, The GNU Emacs Manual}, for how to | ||
| 668 | enter curved single quotes. | ||
| 665 | 669 | ||
| 666 | Documentation strings can also use an older single-quoting convention, | 670 | Documentation strings can also use an older single-quoting convention, |
| 667 | which quotes symbols with grave accent @samp{`} and apostrophe | 671 | which quotes symbols with grave accent @t{`} and apostrophe |
| 668 | @samp{'}: @samp{`like-this'} rather than @samp{‘like-this’}. This | 672 | @t{'}: @t{`like-this'} rather than @t{‘like-this’}. This |
| 669 | older convention was designed for now-obsolete displays in which grave | 673 | older convention was designed for now-obsolete displays in which grave |
| 670 | accent and apostrophe were mirror images. Documentation in this older | 674 | accent and apostrophe were mirror images. Documentation in this older |
| 671 | convention is converted to the standard convention when it is copied | 675 | convention is converted to the standard convention when it is copied |