Next: Filling Text, Previous: Pages, Up: Commands for Human Languages [Contents][Index]
27.5 Quotation MarksOne common way to quote is the typewriter convention, which quotes using straight apostrophes ‘'like this'’ or double-quotes ‘"like this"’. Another common way is the curved quote convention, which uses left and right single or double quotation marks âlike thisâ
or âlike thisâ
12. In text files, typewriter quotes are simple and portable; curved quotes are less ambiguous and typically look nicer.
Electric Quote mode makes it easier to type curved quotes. As you type characters it optionally converts ` to â
, ' to â
, `` to â
, and '' to â
. It’s possible to change the default quotes listed above, by customizing the variable electric-quote-chars
, a list of four characters, where the items correspond to the left single quote, the right single quote, the left double quote and the right double quote, respectively, whose default value is '(?â ?â ?â ?â)
.
You can customize the behavior of Electric Quote mode by customizing variables that control where it is active. It is active in text paragraphs if electric-quote-paragraph
is non-nil
, in programming-language comments if electric-quote-comment
is non-nil
, and in programming-language strings if electric-quote-string
is non-nil
. The default is nil
for electric-quote-string
and t
for the other variables.
You can also set the option electric-quote-replace-double
to a non-nil
value. Then, typing " inserts an appropriate curved double quote depending on context: â
at the beginning of the buffer or after a line break, whitespace, opening parenthesis, or quote character, and â
otherwise.
Electric Quote mode is disabled by default. To toggle it in a single buffer, use M-x electric-quote-local-mode. To toggle it globally, type M-x electric-quote-mode. To suppress it for a single use, type C-q ` or C-q ' instead of ` or '. To insert a curved quote even when Electric Quote is disabled or inactive, you can type C-x 8 [ for â
, C-x 8 ] for â
, C-x 8 { for â
, and C-x 8 } for â
. See Inserting Text. Note that the value of electric-quote-chars
does not affect these key bindings, they are not key bindings of electric-quote-mode
but bound in global-map
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4