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

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

bug#21465: [PATCH] CC-modes hierarchy


From: Mark Oteiza
Subject: bug#21465: [PATCH] CC-modes hierarchy
Date: Sat, 12 Sep 2015 12:51:47 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Package: Emacs
> Version: 25.0.50
> - Move code common to all CC-mode major modes to a c-mode-common-mode 
> function.
> - Add new c-derivative-mode as a parent of C, C++, and ObjC, for
>   settings which apply to C-derived languages but not for others.
>   This has become necessary given that CC-mode is used nowadays as an
>   engine for modes which have little to do with C.
>  ...
> - Remove c-make-inherited-keymap, since it's not used any more.

It is not clear to me how to adapt a 3rd party derived mode to
this. Granted, it was never clear to me how to make a mode derived from
CC mode, but that's another thread.

For mode derivation, either I have

(define-derived-mode foo++-mode c++-mode "Foo++"
 ...)

In which case there will be a parent c++-mode-map and a C++ menu present
when there shouldn't be, or:

(define-derived-mode foo++-mode c-derivative-mode "Foo++"
 ...)

and fontification is broken.

I've attached an example:

Attachment: freefem++-mode.el
Description: freefem++ mode


reply via email to

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