Mercurial > emacs
diff lisp/progmodes/python.el @ 102153:603bb57bb542
(python-shift-left, python-shift-right):
When the mark is not active shift the current line. (Bug#2381)
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Fri, 20 Feb 2009 16:30:53 +0000 |
parents | 84b9607bddb0 |
children | 2e0765155e47 |
line wrap: on
line diff
--- a/lisp/progmodes/python.el Fri Feb 20 14:24:55 2009 +0000 +++ b/lisp/progmodes/python.el Fri Feb 20 16:30:53 2009 +0000 @@ -2008,9 +2008,10 @@ 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 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))