emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python-mode: keep mark when shifting [patch]


From: David Reitter
Subject: Re: python-mode: keep mark when shifting [patch]
Date: Mon, 13 Mar 2006 11:34:07 +0000

On 13 Mar 2006, at 00:22, Dave Love wrote:

 The shift-region functions are inherited from the old python-mode.el
and may or may not really be a good idea.

Consider the following use case: A code block is to be moved out of its context in order to stick it into a separate function. I yank it at its destination, write a "def newfunc():" at the top. But now I have to reindent it. Repeated use of C-c > and C-c < do that job just fine. However, because it is typically used repeatedly on the same region, deactivating the mark is very inconvenient.

In other languages, I would use C-M-\ to re-indent automatically, which is impossible in Python, since indentation carries semantics and doesn't follow from the code. You mentioned that other indentation function (i.e. shift functions) also deactivate the mark. If that's so, I would argue that these should be changed as well for the same reason.












reply via email to

[Prev in Thread] Current Thread [Next in Thread]