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

Previous Next

Package: emacs;

Reported by: Guillaume Salagnac <guillaume.salagnac <at> gmail.com>

Date: Thu, 19 Feb 2009 06:55:04 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 2381-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 2381-done <at> debbugs.gnu.org
Cc: Guillaume Salagnac <guillaume.salagnac <at> gmail.com>
Subject: Re: bug#2381: Python mode: python-shift-left and python-shift-right
 are	not working if the region is inactive
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 <guillaume.salagnac <at> gmail.com>

Thanks for the report, martin.




This bug report was last modified 16 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.