Commit 84085e36 authored by Paul Eggert's avatar Paul Eggert
Browse files

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".
parent dbc192b4
......@@ -104,10 +104,22 @@ the letters @kbd{a} to @kbd{f} serve as part of a character code,
just like digits. Case is ignored.
@findex insert-char
@kindex C-x 8 RET
@kindex C-x 8
@cindex Unicode characters, inserting
@cindex insert Unicode character
@cindex characters, inserting by name or code-point
@cindex curly quotes
@cindex curved quotes
A few common Unicode characters can be inserted via a command
starting with @kbd{C-x 8}. For example, @kbd{C-x 8 [} inserts @t{‘}
which is Unicode code-point @code{U+2018} LEFT SINGLE QUOTATION MARK,
sometimes called a left single ``curved quote'' or ``curly quote''.
Similarly, @kbd{C-x 8 ]}, @kbd{C-x 8 @{} and @kbd{C-x 8 @}} insert the
curved quotes @t{’}, @t{“} and @t{”}, respectively. Also, a working
Alt key acts like @kbd{C-x 8}; e.g., @kbd{A-[} acts like @kbd{C-x 8 [}
and inserts @t{‘}. To see which characters have @kbd{C-x 8}
shorthands, type @kbd{C-x 8 C-h}.
Alternatively, you can use the command @kbd{C-x 8 @key{RET}}
(@code{insert-char}). This prompts for the Unicode name or code-point
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
Unicode), or a number with a specified radix, e.g., @code{#o23072}
(octal); @xref{Integer Basics,,, elisp, The Emacs Lisp Reference
Manual}. The command then inserts the corresponding character into
the buffer. For example, both of the following insert the infinity
sign (Unicode code-point @code{U+221E}):
@example
@kbd{C-x 8 @key{RET} infinity @key{RET}}
@kbd{C-x 8 @key{RET} 221e @key{RET}}
@end example
A numeric argument to @kbd{C-q} or @kbd{C-x 8 @key{RET}} specifies
how many copies of the character to insert (@pxref{Arguments}).
the buffer.
In some contexts, if you type a quotation using grave accent and
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
this''} using double grave accent and apostrophe converts it to a form
@t{“like this”} using double quotation marks. @xref{Quotation Marks}.
For example, the following all insert the same character:
@example
@kbd{C-x 8 @key{RET} left single quotation mark @key{RET}}
@kbd{C-x 8 @key{RET} left sin @key{TAB} @key{RET}}
@kbd{C-x 8 @key{RET} 2018 @key{RET}}
@kbd{C-x 8 [}
@kbd{A-[} @r{(if the Alt key works)}
@kbd{`} @r{(in Electric Quote mode)}
@end example
A numeric argument to @kbd{C-q} or @kbd{C-x 8 ...} specifies
how many copies of the character to insert (@pxref{Arguments}).
@node Moving Point
@section Changing the Location of Point
......
......@@ -136,8 +136,11 @@ displayed on your terminal, they appear as @samp{?} or as hollow boxes
Keyboards, even in the countries where these character sets are
used, generally don't have keys for all the characters in them. You
can insert characters that your keyboard does not support, using
@kbd{C-q} (@code{quoted-insert}) or @kbd{C-x 8 @key{RET}}
(@code{insert-char}). @xref{Inserting Text}. Emacs also supports
@kbd{C-x 8 @key{RET}} (@code{insert-char}). @xref{Inserting Text}.
Shorthands are available for some common characters; for example, you
can insert a left single quotation mark @t{‘} by typing @kbd{C-x 8
[}, or in Electric Quote mode often by simply typing @kbd{`}.
@xref{Quotation Marks}. Emacs also supports
various @dfn{input methods}, typically one for each script or
language, which make it easier to type characters in the script.
@xref{Input Methods}.
......
......@@ -410,6 +410,8 @@ beginning of a line.
@cindex Quotation marks
@cindex Electric Quote mode
@cindex mode, Electric Quote
@cindex curly quotes
@cindex curved quotes
@findex electric-quote-mode
One common way to quote is the typewriter convention, which quotes
using straight apostrophes @t{'like this'} or double-quotes @t{"like
......@@ -443,7 +445,8 @@ variables.
@kbd{M-x electric-quote-local-mode}. To suppress it for a single use,
type @kbd{C-q `} or @kbd{C-q '} instead of @kbd{`} or @kbd{'}. To
insert a curved quote even when Electric Quote is disabled or
inactive, use @kbd{C-x 8 @key{RET}} (@code{insert-char}).
inactive, you can type @kbd{C-x 8 [} for @t{‘}, @kbd{C-x 8 ]} for
@t{’}, @kbd{C-x 8 @{} for @t{“}, and @kbd{C-x 8 @}} for @t{”}.
@xref{Inserting Text}.
@node Filling
......
......@@ -657,15 +657,19 @@ starting double-quote is not part of the string!
@anchor{Docstring hyperlinks}
@item
@cindex curly quotes
@cindex curved quotes
When a documentation string refers to a Lisp symbol, write it as it
would be printed (which usually means in lower case), surrounding
it with curved single quotes (@samp{} and @samp{}). There are
it with curved single quotes (@t{} and @t{}). There are
two exceptions: write @code{t} and @code{nil} without surrounding
punctuation. For example: @samp{CODE can be lambda, nil, or t.}
punctuation. For example: @samp{CODE can be lambda, nil, or t}.
@xref{Quotation Marks,,, emacs, The GNU Emacs Manual}, for how to
enter curved single quotes.
Documentation strings can also use an older single-quoting convention,
which quotes symbols with grave accent @samp{`} and apostrophe
@samp{'}: @samp{`like-this'} rather than @samp{like-this}. This
which quotes symbols with grave accent @t{`} and apostrophe
@t{'}: @t{`like-this'} rather than @t{like-this}. This
older convention was designed for now-obsolete displays in which grave
accent and apostrophe were mirror images. Documentation in this older
convention is converted to the standard convention when it is copied
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment