GNU bug report logs -
#38406
27.0.50; post-self-insert-hook does not hold its contract in cc-mode derived modes
Previous Next
Reported by: yyoncho <yyoncho <at> gmail.com>
Date: Wed, 27 Nov 2019 20:01:01 UTC
Severity: normal
Found in version 27.0.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #50 received at 38406 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 4 Dec 2019 20:41:59 +0000
> Cc: 38406 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm <at> muc.de>
>
> 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?
This bug report was last modified 5 years and 168 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.