diff options
| author | Philipp Stephani | 2017-06-28 23:47:57 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-07-02 17:48:23 +0200 |
| commit | 34d4720f833bb382b28d9faecf82d34db1eb4494 (patch) | |
| tree | f149e3b03da94c7db458610007e82b33ac735018 /etc | |
| parent | d90b98a2a52abf67b84aa12df282b0defec8505b (diff) | |
| download | emacs-34d4720f833bb382b28d9faecf82d34db1eb4494.tar.gz emacs-34d4720f833bb382b28d9faecf82d34db1eb4494.zip | |
Electric quotes: Improve support for Markdown mode (Bug#24709)
Introduce a new user option 'electric-quote-context-sensitive'. If
non-nil, have ' insert an opening quote if sensible.
Also introduce a new variable 'electric-quote-code-faces'. Major
modes such as 'markdown-mode' can add faces to this list to treat text
as inline code and disable electric quoting.
* lisp/electric.el (electric-quote-context-sensitive): New user
option.
(electric-quote-code-faces): New variable.
(electric-quote-post-self-insert-function): Treat ' as ` if
desired and applicable; disable electric quoting for given faces.
* test/lisp/electric-tests.el (electric-quote-opening-single)
(electric-quote-closing-single, electric-quote-opening-double)
(electric-quote-closing-double)
(electric-quote-context-sensitive-backtick)
(electric-quote-context-sensitive-bob-single)
(electric-quote-context-sensitive-bob-double)
(electric-quote-context-sensitive-bol-single)
(electric-quote-context-sensitive-bol-double)
(electric-quote-context-sensitive-after-space-single)
(electric-quote-context-sensitive-after-space-double)
(electric-quote-context-sensitive-after-letter-single)
(electric-quote-context-sensitive-after-letter-double)
(electric-quote-context-sensitive-after-paren-single)
(electric-quote-context-sensitive-after-paren-double)
(electric-quote-markdown-in-text)
(electric-quote-markdown-in-code): New unit tests.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 16 |
1 files changed, 16 insertions, 0 deletions
| @@ -129,6 +129,22 @@ given file is on a case-insensitive filesystem. | |||
| 129 | of curved quotes for 'electric-quote-mode', allowing user to choose | 129 | of curved quotes for 'electric-quote-mode', allowing user to choose |
| 130 | the types of quotes to be used. | 130 | the types of quotes to be used. |
| 131 | 131 | ||
| 132 | ** The new user option 'electric-quote-context-sensitive' makes | ||
| 133 | 'electric-quote-mode' context sensitive. If it is non-nil, you can | ||
| 134 | type an ASCII apostrophe to insert an opening or closing quote, | ||
| 135 | depending on context. Emacs will replace the apostrophe by an opening | ||
| 136 | quote character at the beginning of the buffer, the beginning of a | ||
| 137 | line, after a whitespace character, and after an opening parenthesis; | ||
| 138 | and it will replace the apostrophe by a closing quote character in all | ||
| 139 | other cases. | ||
| 140 | |||
| 141 | ** The new variable 'electric-quote-code-faces' controls when to | ||
| 142 | disable electric quoting in text modes. Major modes can add faces to | ||
| 143 | this list; Emacs will temporarily disable 'electric-quote-mode' | ||
| 144 | whenever point is before a character having such a face. This is | ||
| 145 | intended for major modes that derive from 'text-mode' but allow inline | ||
| 146 | code segments, such as 'markdown-mode'. | ||
| 147 | |||
| 132 | +++ | 148 | +++ |
| 133 | ** The new user variable 'dired-omit-case-fold' allows the user to | 149 | ** The new user variable 'dired-omit-case-fold' allows the user to |
| 134 | customize the case-sensitivity of dired-omit-mode. It defaults to | 150 | customize the case-sensitivity of dired-omit-mode. It defaults to |