Use hook instead of face list to inhibit electric quoting
commit4cd0db3d6e6e4d5bd49283483bdafbbfc0f583f1
authorPhilipp Stephani <phst@google.com>
Mon, 3 Jul 2017 16:46:10 +0000 (3 18:46 +0200)
committerPhilipp Stephani <phst@google.com>
Mon, 3 Jul 2017 18:59:31 +0000 (3 20:59 +0200)
tree4363283d8e790be49490ce2123f32db811e083f9
parent9ac7dccc51ee834b06cdabf6a5746eb375f984f0
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.
etc/NEWS
lisp/electric.el
test/lisp/electric-tests.el