diff options
| author | Philipp Stephani | 2017-07-23 21:58:49 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-10-01 00:20:36 +0200 |
| commit | d247e1d30abcb77665f829ca98a5bdef69ff4bc3 (patch) | |
| tree | db9c7b1127eaa1860fbc586c8eace53ea4e3c4f2 /doc | |
| parent | d88a0f6554888643854ddb2c1f49b77b0bf8904c (diff) | |
| download | emacs-d247e1d30abcb77665f829ca98a5bdef69ff4bc3.tar.gz emacs-d247e1d30abcb77665f829ca98a5bdef69ff4bc3.zip | |
Electric quote mode: Conditionally replace " (Bug#24710)
* lisp/electric.el (electric-quote-replace-double): New user option.
(electric-quote-post-self-insert-function): Use it.
* test/lisp/electric-tests.el (electric-quote-replace-double-disabled)
(electric-quote-replace-double-bob)
(electric-quote-replace-double-bol)
(electric-quote-replace-double-after-space)
(electric-quote-replace-double-after-letter)
(electric-quote-replace-double-after-paren): New unit tests.
* doc/emacs/text.texi (Quotation Marks): Document
'electric-quote-replace-double'.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/text.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 496b43ce1e3..5aa0c77d34c 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -443,6 +443,13 @@ non-@code{nil}, and in programming-language strings if | |||
| 443 | @code{nil} for @code{electric-quote-string} and @code{t} for the other | 443 | @code{nil} for @code{electric-quote-string} and @code{t} for the other |
| 444 | variables. | 444 | variables. |
| 445 | 445 | ||
| 446 | @vindex electric-quote-replace-double | ||
| 447 | You can also set the option @code{electric-quote-replace-double} to | ||
| 448 | a non-@code{nil} value. Then, typing @t{"} insert an appropriate | ||
| 449 | curved double quote depending on context: @t{“} at the beginning of | ||
| 450 | the buffer or after a line break, whitespace, opening parenthesis, or | ||
| 451 | quote character, and @t{”} otherwise. | ||
| 452 | |||
| 446 | Electric Quote mode is disabled by default. To toggle it, type | 453 | Electric Quote mode is disabled by default. To toggle it, type |
| 447 | @kbd{M-x electric-quote-mode}. To toggle it in a single buffer, use | 454 | @kbd{M-x electric-quote-mode}. To toggle it in a single buffer, use |
| 448 | @kbd{M-x electric-quote-local-mode}. To suppress it for a single use, | 455 | @kbd{M-x electric-quote-local-mode}. To suppress it for a single use, |