Subject: Re: bug#2381: Python mode: python-shift-left and python-shift-right are not working if the region is inactive

From: martin rudalics <[email-masked]>
Date: Fri, 20 Feb 2009 17:31:43 +0100

> In Python mode (the one provided by lisp/progmodes/python.el) there are
 > two functions that look very handy for indenting/reindenting code :
 > python-shift-left and python-shift-right.
 >
 > According to their documentation string, they can work either on the
 > current active region, or on the current line if the region is not
 > active. However, this latter feature does not seem to work properly.
 >
 > Steps to reproduce error: open emacs, type M-x python-mode, type some
 > code, and try "C-c <" or "C-c >" with no active region.
 >
 > A simple fix seems to be achieved by replacing this "(point) (point)"
 > default value, which is obviously empty, by  "(line-beginning-position)
 > (line-end-position)" in both functions.

I checked in your suggestion as

	* progmodes/python.el (python-shift-left, python-shift-right):
	When the mark is not active shift the current line.  (Bug#2381)
	Suggested by Guillaume Salagnac <[email-masked]>

Thanks for the report, martin.