diff options
| author | Göktuğ Kayaalp | 2016-10-27 08:05:24 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-10-27 08:11:25 -0700 |
| commit | 11d380a029640eeb99badfa31976e9c47f53b002 (patch) | |
| tree | 42f42457eece58a84b1084a5ba218b3a090bc05b /doc | |
| parent | 53a0562b2c69d7598c51c03417d8daab46f375c9 (diff) | |
| download | emacs-11d380a029640eeb99badfa31976e9c47f53b002.tar.gz emacs-11d380a029640eeb99badfa31976e9c47f53b002.zip | |
New user variable 'electric-quote-chars'
* doc/emacs/text.texi (Quotation Marks), etc/NEWS: Document this.
* lisp/electric.el (electric-quote-chars): New defcustom.
(electric-quote-post-self-insert-function): Use it.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/text.texi | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 7fa0804d270..4c6a1ffbdd2 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -412,6 +412,7 @@ beginning of a line. | |||
| 412 | @cindex mode, Electric Quote | 412 | @cindex mode, Electric Quote |
| 413 | @cindex curly quotes | 413 | @cindex curly quotes |
| 414 | @cindex curved quotes | 414 | @cindex curved quotes |
| 415 | @cindex guillemets | ||
| 415 | @findex electric-quote-mode | 416 | @findex electric-quote-mode |
| 416 | One common way to quote is the typewriter convention, which quotes | 417 | One common way to quote is the typewriter convention, which quotes |
| 417 | using straight apostrophes @t{'like this'} or double-quotes @t{"like | 418 | using straight apostrophes @t{'like this'} or double-quotes @t{"like |
| @@ -420,9 +421,15 @@ left and right single or double quotation marks @t{‘like this’} or | |||
| 420 | @t{“like this”}. In text files, typewriter quotes are simple and | 421 | @t{“like this”}. In text files, typewriter quotes are simple and |
| 421 | portable; curved quotes are less ambiguous and typically look nicer. | 422 | portable; curved quotes are less ambiguous and typically look nicer. |
| 422 | 423 | ||
| 424 | @vindex electric-quote-chars | ||
| 423 | Electric Quote mode makes it easier to type curved quotes. As you | 425 | Electric Quote mode makes it easier to type curved quotes. As you |
| 424 | type characters it optionally converts @t{`} to @t{‘}, @t{'} to @t{’}, | 426 | type characters it optionally converts @t{`} to @t{‘}, @t{'} to @t{’}, |
| 425 | @t{``} to @t{“}, and @t{''} to @t{”}. | 427 | @t{``} to @t{“}, and @t{''} to @t{”}. It's possible to change the |
| 428 | default quotes listed above, by customizing the variable | ||
| 429 | @code{electric-quote-chars}, a list of four characters, where the | ||
| 430 | items correspond to the left single quote, the right single quote, the | ||
| 431 | left double quote and the right double quote, respectively, whose | ||
| 432 | default value is @code{'(?‘ ?’ ?“ ?”)}. | ||
| 426 | 433 | ||
| 427 | @vindex electric-quote-paragraph | 434 | @vindex electric-quote-paragraph |
| 428 | @vindex electric-quote-comment | 435 | @vindex electric-quote-comment |
| @@ -443,7 +450,10 @@ type @kbd{C-q `} or @kbd{C-q '} instead of @kbd{`} or @kbd{'}. To | |||
| 443 | insert a curved quote even when Electric Quote is disabled or | 450 | insert a curved quote even when Electric Quote is disabled or |
| 444 | inactive, you can type @kbd{C-x 8 [} for @t{‘}, @kbd{C-x 8 ]} for | 451 | inactive, you can type @kbd{C-x 8 [} for @t{‘}, @kbd{C-x 8 ]} for |
| 445 | @t{’}, @kbd{C-x 8 @{} for @t{“}, and @kbd{C-x 8 @}} for @t{”}. | 452 | @t{’}, @kbd{C-x 8 @{} for @t{“}, and @kbd{C-x 8 @}} for @t{”}. |
| 446 | @xref{Inserting Text}. | 453 | @xref{Inserting Text}. Note that the value of |
| 454 | @code{electric-quote-chars} does not affect these keybindings, they | ||
| 455 | are not keybindings of @code{electric-quote-mode} but bound in | ||
| 456 | @code{global-map}. | ||
| 447 | 457 | ||
| 448 | @node Filling | 458 | @node Filling |
| 449 | @section Filling Text | 459 | @section Filling Text |