[Python-mode] comment to signal de-indentation?

Andreas Eisele eisele at coli.uni-sb.de
Thu Feb 19 11:51:55 EST 2004



Dear Barry,

Thanks for the quick reply!

> I'm a bit pressed for time, but quickly, there are two things to look
> at.  First, the variable py-honor-comment-indentation may be what you
> were trying to get after with your #- comment suggestion.

It goes into an interesting direction, but does not
exactly do what I want.  Perhaps I can bend it a bit.

> Second, the real way to re-indent Python code after refactoring is by
> using py-shift-region-left (C-c <) and py-shift-region-right (C-c >). 
> Usually when you refactor, you're moving an entire block in or out a
> level of indentation.  Just highlight the block and use these commands
> to get that block at the indentation level you want.

That looks like a good approach. Unfortunately, I am
using Xfree86 under cygwin with the -clipboard feature,
which enables copy-and-paste between X and Windows, but
only at the price that region commands in emacs don't
work any more (the region is de-selected immediately
after selection).  That's why I never seriously tried
to learn these commands.  But perhaps I should
reconsider this option now.


Best regards,

Andreas

-- 
Dr. Andreas Eisele          Computational Linguistics           
University of Saarland          eisele at coli.uni-sb.de
Stuhlsatzenhausweg 3            tel: +49-681-302-5285
D-66123 Saarbrücken             fax: +49-681-302-5338





More information about the Python-mode mailing list