help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about dir-locals c-mode.


From: Stefan Monnier
Subject: Re: Question about dir-locals c-mode.
Date: Sun, 08 Nov 2020 12:58:53 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> (c++-mode . (...Long...))
>>> (c-mode . (...Long...))
>>FWIW, I had sent a patch to CC-mode to introduce a parent mode shared by
>>c-mode, c++-mode, and objc-mode, but Alan didn't like the idea.
> :( There is the c-mode-common-hook I was actually expecting that there
> should be something like c-mode-common. Somehow it seems intuitive for
> me. Some packages like irony have actually some hacks to go around this
> too.

Note that `c-mode-common-hook` is not just common to C-like languages
but applies to all modes using the CC-mode framework, which includes
java-mode, awk-mode, php-mode, sieve-mode, and various others.  So it
risks being "too common" for the kind of usage you describe (and yes, my
patch had two parent modes: one common to C, C++, and ObjC, and another
one on top common to all CC-mode derivatives).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]