[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#2421: 23.0.90; python-mode: Indent commands behavior
From: |
martin rudalics |
Subject: |
bug#2421: 23.0.90; python-mode: Indent commands behavior |
Date: |
Sun, 22 Feb 2009 19:29:52 +0100 |
User-agent: |
Thunderbird 2.0.0.16 (Windows/20080708) |
> mr> Isn't that shift behavior something that should be done via
> mr> rectangles?
>
> Do you mean by the user? No, this would require marking the region on
> exact characters rather than lines, i.e. it would be less comfortable
You're right that rect.el doesn't have suitable code for highlighting
and dragging rectangles. cua-rect.el has two functions for shifting
rectangles, but I don't know whether they could be used here.
> and would make the operation more visual than logical.
That was my intention. I don't know whether `python-shift-left' and
`python-shift-right' are of any use without a prefix argument. With a
prefix argument, they are simple wrappers for `indent-rigidly'. And
`indent-rigidly' is a purely visual operation. That is, if indenting
part of a program changes the semantics of the program, it's the user
who's responsible, without any "logical" support from `python-mode'.
But since I never use these functions you shouldn't take my remarks too
seriously. Maybe you could propose a patch to provide the behavior you
like. In any case, it might be better to use `use-region-p' instead of
`mark-active' to be more consistent with Emacs 23.
martin