Re: Proposed fix : emacs e-mode indentation not working
Pierre Radermecker <pradermecker-FFYn/[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
Mark Miller wrote: > On Nov 23, 2007 6:48 PM, Pierre Radermecker <[email protected]> wrote: >> I have managed to make it work by modifying the file custom-e-mode. >> >> I have just added one line with >> (c-mode) >> in the function (defun run-e () ... >> >> I am not sure this is the correct way to fix it but well ... >> >> It would be nice to have a correction in the svn repository. > > Worked for me. It's now svn-committed. Thanks! > The fix is probably the wrong way to solve the problem. It seems to work ok but I am not sure it is ideal. I have been trying to rewrite the file using some cc-mode extension template. It is not that easy (CC-mode is not that trivial). Syntactically as far as indentation is concerned E seems closer to Javascript than C, C++ or Java. So I have had a look around about Javascript emacs mode. From the writer of one of the javascript mode: (http://www.emacswiki.org/cgi-bin/wiki/JavaScriptMode) "I think however that Karl’s module has a better approach in that it is not derived from another mode the way mine is. I took the easy (lazy) route and derived mine from java-mode, seeing that the two languages had a lot of keywords in common, and similar C-style syntax. While this facilitated the syntax highlighting, comments, and the like, it also produced some odd behavior in indentation and colorizing, owing to the differences in the languages." (PS java-mode is derived from CC-mode) I have copied/paste (shame on me) karl's module and adapted a little bit. It looks promising so far. I am wondering if it is not a better starting point to get a better emacs mode. I would love to have some feedback from the original authors of the custom-e-mode. I don't know if it is possible to use the c-indent-line function outside of the CC-mode (it seems it was the intention). I would appreciate any comment from emacs E users out there ... Please be aware that my current knowledge of both elisp and E is quite limited. PS Scala emacs mode does not use CC-mode either Regards, -Pierre _______________________________________________ e-lang mailing list [email protected] http://www.eros-os.org/mailman/listinfo/e-lang