I am trying to reuse lots of things that are built in c-mode
for technically another c-like language, including syntactical highlighting and stuff like that.
However, c-mode
in my settings are customized using mode hooks. Specifically, I have enabled following two lines in my c-mode-hook
:
(semantic-mode t)
(semantic-idle-summary-mode t)
(semantic-stickyfunc-mode t)
But this is breaking the major mode derived from c-mode
, because semantic-mode
has no idea how to parse the source file in another c-like language. Is there a way to derive a major mode from an existing one without running the hooks for the parent?
M-x report-emacs-bug
, e.g., to request an enhancement along the lines @Stefan sugggested in his answer - forc-mode
, for example.