Subject: bug#38406: 27.0.50; post-self-insert-hook does not hold its contract in cc-mode derived modes

From: Eli Zaretskii <[email-masked]>
Date: Thu, 05 Dec 2019 16:45:12 +0200

> Date: Wed, 4 Dec 2019 20:41:59 +0000
> Cc: [email-masked]
> From: Alan Mackenzie <[email-masked]>
> 
> OK, here's a patch which I think does just what's wanted.  Would you
> please try it out, Ivan, then let me know that it works, or about any
> problems which there still may be?  Thanks.

Thanks.

> +(defvar c--unsafe-post-self-insert-hook-functions
> +  '(smie-blink-matching-open
> +    electric-pair-post-self-insert-function
> +    blink-paren-post-self-insert-function
> +    electric-indent-post-self-insert-function
> +    electric-layout-post-self-insert-function
> +    electric-quote-post-self-insert-function)
> +    "Known unsafe functions when members of `post-self-insert-hook' in CC Mode")

Can you explain why you exempt these from being called from CC Mode?
AFAIU, by disabling them when CC Mode reacts to insertion, you have
solved the conflict between any such hook and CC Mode, so why not call
any such hook afterwards?