emacs-scad-mode
emacs-scad-mode copied to clipboard
Recognize #
Hi!
This mode doesn't recognize # in .scad files. # is used for debugging scad files, highlighting the object defined after it.
Inserting # while using this mode breaks the indentation, sometimes leading to more severe misparsing that are only solved by restarting scad-mode
So, this issue requests as a feature dealing correctly with #
Thanks!
Can you give an example please? Patches welcome.
Can you give an example please?
Sure, here's a simple one:
union() {
union() {
#cube();
sphere();
}
}
If you use scad-mode + electric-indent-mode, for example, after pressing TAB the #cube(); statement goes to the left extreme. The same doesn't happen if we use %.
About it leading to more severe problems, I can't find a simple reproducible example as it occurs only after editing a scad with # for a while...
Patches welcome.
I tried to find a solution, but I never wrote major modes on elisp... I but I think this happens because of the dependency on cc-mode-related stuff, specially because in C/C++ the # is primarily used for defining preprocessor directives, which normally are in the top-level indent