diff options
author | Martin Rudalics <[email protected]> | 2009-02-20 16:30:53 +0000 |
---|---|---|
committer | Martin Rudalics <[email protected]> | 2009-02-20 16:30:53 +0000 |
commit | 3ba6d4ed56d9d9b6d4c570d057ad9ce11e3ae0ff (patch) | |
tree | 721b9fd1e4fb0879029917b44dccb67acdc70dcf /lisp | |
parent | 7b704afe99c01110ff3fa7d5d534ea61fc112f3c (diff) |
(python-shift-left, python-shift-right):
When the mark is not active shift the current line. (Bug#2381)
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/progmodes/python.el | 14 |
2 files changed, 14 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9064658ab9..478544f77f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-02-20 Martin Rudalics <[email protected]> + + * 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 protected]> + 2009-02-20 Andreas Schwab <[email protected]> * startup.el (command-line): Don't match an empty argument as an diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index cacd56b663..7221d8ecb7 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2008,9 +2008,10 @@ COUNT defaults to `python-indent'. If region isn't active, just shift current line. The region shifted includes the lines in which START and END lie. It is an error if any lines in the region are indented less than COUNT columns." - (interactive (if mark-active - (list (region-beginning) (region-end) current-prefix-arg) - (list (point) (point) current-prefix-arg))) + (interactive + (if mark-active + (list (region-beginning) (region-end) current-prefix-arg) + (list (line-beginning-position) (line-end-position) current-prefix-arg))) (if count (setq count (prefix-numeric-value count)) (setq count python-indent)) @@ -2031,9 +2032,10 @@ COUNT columns." COUNT defaults to `python-indent'. If region isn't active, just shift current line. The region shifted includes the lines in which START and END lie." - (interactive (if mark-active - (list (region-beginning) (region-end) current-prefix-arg) - (list (point) (point) current-prefix-arg))) + (interactive + (if mark-active + (list (region-beginning) (region-end) current-prefix-arg) + (list (line-beginning-position) (line-end-position) current-prefix-arg))) (if count (setq count (prefix-numeric-value count)) (setq count python-indent)) |