diff options
| author | Philipp Stephani | 2017-07-03 18:46:10 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-07-03 20:59:31 +0200 |
| commit | 4cd0db3d6e6e4d5bd49283483bdafbbfc0f583f1 (patch) | |
| tree | 4363283d8e790be49490ce2123f32db811e083f9 /etc | |
| parent | 9ac7dccc51ee834b06cdabf6a5746eb375f984f0 (diff) | |
| download | emacs-4cd0db3d6e6e4d5bd49283483bdafbbfc0f583f1.tar.gz emacs-4cd0db3d6e6e4d5bd49283483bdafbbfc0f583f1.zip | |
Use hook instead of face list to inhibit electric quoting
This is more flexible and doesn't couple electric quoting to font
locking.
Give that 'electric-quote-code-faces' was just introduced, remove it
without formal deprecation.
* lisp/electric.el (electric-quote-inhibit-functions): New abnormal
hook variable.
(electric-quote-post-self-insert-function): Run the hook. Remove
use of old 'electric-quote-code-faces' variable.
* test/lisp/electric-tests.el (electric-quote-markdown-in-text)
(electric-quote-markdown-in-code): Adapt unit tests.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 12 |
1 files changed, 6 insertions, 6 deletions
| @@ -138,12 +138,12 @@ line, after a whitespace character, and after an opening parenthesis; | |||
| 138 | and it will replace the apostrophe by a closing quote character in all | 138 | and it will replace the apostrophe by a closing quote character in all |
| 139 | other cases. | 139 | other cases. |
| 140 | 140 | ||
| 141 | ** The new variable 'electric-quote-code-faces' controls when to | 141 | ** The new variable 'electric-quote-inhibit-functions' controls when |
| 142 | disable electric quoting in text modes. Major modes can add faces to | 142 | to disable electric quoting based on context. Major modes can add |
| 143 | this list; Emacs will temporarily disable 'electric-quote-mode' | 143 | functions to this list; Emacs will temporarily disable |
| 144 | whenever point is before a character having such a face. This is | 144 | 'electric-quote-mode' whenever any of the functions returns non-nil. |
| 145 | intended for major modes that derive from 'text-mode' but allow inline | 145 | This can be used by major modes that derive from 'text-mode' but allow |
| 146 | code segments, such as 'markdown-mode'. | 146 | inline code segments, such as 'markdown-mode'. |
| 147 | 147 | ||
| 148 | +++ | 148 | +++ |
| 149 | ** 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 |