GNU bug report logs -
#2421
23.0.90; python-mode: Indent commands behavior
Previous Next
Reported by: Milan Zamazal <pdm <at> zamazal.org>
Date: Sat, 21 Feb 2009 10:30:05 UTC
Severity: wishlist
Done: Fabián Ezequiel Gallina <fabian <at> anue.biz>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Well, actually TAB runs indent-region. But I need simple shift instead.
> Consider the following example:
>
> def foo():
> for i in range(3):
> print i
> print i + 1
> print i + 2
>
> I just pasted the print lines from a differently indented code and want
> to fix the indentation by shifting the region of the print lines:
>
> def foo():
> for i in range(3):
> print i
> print i + 1
> print i + 2
>
> TAB can't do it:
>
> def foo():
> for i in range(3):
> print i
> print i + 1
> print i + 2
We could pass the prefix argument to `indent-region' with the semantics
that the latter ignores the mode-specific `indent-region-function' and
calls `indent-line' for each line in the region instead.
Alternatively, `python-indent-region' could, like `python-indent-line',
remember whether the last command was an `indent-for-tab-command' and
call `python-indent-line-1' with no argument for each line in the
region. Obviously, the region would have to stay to make this
practical. And in some pathological cases it might be hard to find the
appropriate indentation points.
Anyhow, I'm afraid that people won't approve such changes.
> To get what I want I have to press `C-8 C->'. I don't like it, I'd like
> to call `M-x SOMETHING-shift-right' twice or
> `M-2 M-x SOMETHING-shift-right'.
That's why I earlier said that some rectangle code should handle this.
martin
This bug report was last modified 12 years and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.