diff options
author | Alan Mackenzie <acm@muc.de> | 2019-01-15 15:54:02 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2019-01-15 15:54:02 +0000 |
commit | 223e7b87872d4a010ae1c9a6f09a9c15aee46692 (patch) | |
tree | 609573333dd10bdce35efc2cfff7ca7b4ea643df /src/buffer.c | |
parent | 9530108fbc8bbf1ad5c1debe4b4f21da1238325b (diff) | |
download | emacs-223e7b87872d4a010ae1c9a6f09a9c15aee46692.tar.gz emacs-223e7b87872d4a010ae1c9a6f09a9c15aee46692.tar.bz2 emacs-223e7b87872d4a010ae1c9a6f09a9c15aee46692.zip |
Make CC Mode and electric-pair-mode work together. This fixes bug #33794
* lisp/progmodes/cc-cmds.el (c-electric-pound, c-electric-slash)
(c-electric-star, c-electric-semi&comma, c-electric-colon, c-electric-lt-gt):
Bind post-self-insert-hook to nil around calls to self-insert-command to
protect against arbitrary functionality confusing CC Mode.
(c-do-brace-electrics): New function, extracted from c-electric-brace and
enhanced.
(c-electric-brace): Bind post-self-insert-hook to nil around the call to
self-insert-command. When electric-pair-mode is configured, call
electric-pair-post-self-insert-function. Handle any deletion done by this
function. Call c-do-brace-electrics for the inserted brace, and perhaps for a
brace inserted by electric-pair-self-insert-function.
(c-electric-paren): Bind post-self-insert-hook to nil around the call to
self-insert-command. When electric-pair-mode is configured, call
electric-pair-post-self-insert-function.
Diffstat (limited to 'src/buffer.c')
0 files changed, 0 insertions, 0 deletions