Subject: Re: bug#21465: [PATCH] CC-modes hierarchy

From: Stefan Monnier <[email-masked]>
Date: Mon, 14 Sep 2015 21:06:06 -0400

> c-after-font-lock-init surely isn't broken.  c-after-change is ALWAYS on
> after-change-functions.

No, it's not.  Not in my sm-awk-mode which derives from awk-mode.
Or rather, I don't want it there and c-after-font-lock-init forces it
down my throat again after I removed it.

> Without it, CC Mode simply wouldn't function.

It does.

Besides, my patch does not remove c-after-change from
after-change-functions.  It just stops c-after-font-lock-init from
re-adding it if someone decided to remove it.  AFAIK c-after-change is
never removed from after-change-functions by accident, so re-adding it
blindly is a bug.

>> AFAIK this patch has no issues w.r.t compatibility since it relies on
>> behavior of define-derived-mode which has existed since "for ever".
>> But it hasn't seen much testing, admittedly (except for my own personal use).
> The question is, will XEmacs's define-derived-mode work?

The text you quote is my answer to the question.

> By the way, abbrev mode is used to expand "else" and "while" to themselves
> + re-indentation.  There are one or two other keywords handled likewise.
> This isn't something either of us like, but doesn't seem urgent enough
> to get round to fixing.

Indeed, I don't think it's urgent to fix it, but I think it deserves
a comment.

        Stefan