I am trying to write a new emacs mode for a new c-like language template that I should use for some academic research.
I want the code to be in color and indented, as in c-mode, with the following exceptions:
- "%" is not used as an operator, but as the first character in some specific keywords (for example: "% p", "% action", etc.).
- Lines of code do not end with a semicolon.
Is it possible to create a derived mode (from c-mode) and set it to ignore the original targets "%" and ";"? Is it possible to use the function "automatic indentation after pressing RET" without ";"?
Are there similar modes for similar languages ββ(with brackets '{}', but without semicolons) that I could try to plan?
Should I try to write the main mode from scratch?
I was thinking about fixing the R mode from http://ess.r-project.org/ , but this mode does not support comments of the form "/ * comment * /".
The most important function I'm looking for is indentation brackets, i.e. indentation inside the block {{} "after pressing RET (and without extra indentation after lines that do not end with ;;), Partial solutions will also help.
source share