smalltalk-mode in non-class files: indent and colon err out “End of buffer”
In my current smalltalk classes, we didn’t do any OOP yet (who knows
why ><), nor creating classes, etc. so we keeps writing raw stuff in
files, so I do with emacs because it’s a lot more convenient than
gst-browser/VisualGST, than don’t have emacs keybindings.
But, and I noticed that before, in org-mode source blocks (btw this one
really oughts to support smalltalk ^^), in some cases (dunno which yet),
from some point, whenever I hit TAB, or return (in now default
electric-indent-mode), or colon (“:”), I end up with nothing hapenning
and emacs erring on “End of buffer”.
This seems to be because `smalltalk-end-of-paren' (that’s called by
`smalltalk-indent-for-colon', which is called at every indent) goes at
the end of the buffer, then `smalltalk-narrow-to-method' (near its end)
goes forward-char by 1, and that triggers and error and stops
Is this because I’m not writing a class? because narrowing to a method
seems strange if there are no methods… or is it supposed to narrow to
the whole buffer if no method?