]> git.eshelyaron.com Git - emacs.git/commit
CC Mode: Allow most functions on post-self-insert-hook to be called
authorAlan Mackenzie <acm@muc.de>
Sat, 7 Dec 2019 18:55:19 +0000 (18:55 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 7 Dec 2019 18:55:19 +0000 (18:55 +0000)
commit68d4a14fd46754c3951dd669c9821447bfbe844e
treef080f2651bb3ff1257e27d26788d10ce38069af6
parent959bbf30032c365c9e6f08dc9211d6bab3123f35
CC Mode: Allow most functions on post-self-insert-hook to be called

This contrasts with the previous state where no such functions got called.
This fixes bug #38406.

* lisp/progmodes/cc-cmds.el (c--unsafe-post-self-insert-hook-functions): New
variable.
(c--call-post-self-insert-hook-more-safely-1): New function.
(c--call-post-self-insert-hook-more-safely): New macro.
(c-electric-pound, c-electric-brace, c-electric-slash, c-electric-star)
(c-electric-semi&comma, c-electric-colon, c-electric-lt-gt, c-electric-paren):
Invoke c--call-post-self-insert-hook-more-safely (which calls most of the hook
post-self-insert-hook) at the end of each of the commands.
lisp/progmodes/cc-cmds.el