[nem-en] Emacs nemerle-mode

Piotr Kalinowski pitkali at gmail.com
Sat Mar 4 00:24:00 CET 2006


On 03/03/06, Matthew D Swank <akopa at charter.net> wrote:
> Well, based on what I like about lisp modes for emacs, it would be nice
> if tab went to the "best" spot on the line based on the current block
> structure.  This, of course, presupposes that newlines put the cursor at
> the beginning of the next line.  What does the mode currently do on
> newlines?

Well, this is done here in a usual way. Hitting enter will go to the
next line. Nothing more - no indenting for instance. I'm not sure were
cursor appears. If you make emacs do newline-and-indent stuff, it
lands were the modes thinks line should begin (i.e. indents line
immediately after newline).

Going to the "best" spot is basically reindenting the current line.
This is actually the default behaviour of the TAB key but it won't
work in Nemerle. Here there is no special character to introduce a
block. In python for instance new block does not only need to be
indented appropriately. The previous line of code must also end with a
colon. Since there is no such requirement in Nemerle, the mode is
unable to catch all the cases were increasing indent might be needed
and I think forcing the programmer to use another key to do it is
rude.

So the TAB will not just reindent line. There are nearly always at
least two "best" spots. The one the program thinks the best, one level
to the right and actually also one level to the left. Perhaps it
should iterate over these three positions then.

Regards,
--
Intelligence is like a river: the deeper it is, the less noise it makes



More information about the devel-en mailing list