aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorMartin Rudalics2009-02-20 16:30:53 +0000
committerMartin Rudalics2009-02-20 16:30:53 +0000
commit3ba6d4ed56d9d9b6d4c570d057ad9ce11e3ae0ff (patch)
tree721b9fd1e4fb0879029917b44dccb67acdc70dcf /lisp/progmodes/python.el
parent7b704afe99c01110ff3fa7d5d534ea61fc112f3c (diff)
downloademacs-3ba6d4ed56d9d9b6d4c570d057ad9ce11e3ae0ff.tar.gz
emacs-3ba6d4ed56d9d9b6d4c570d057ad9ce11e3ae0ff.zip
(python-shift-left, python-shift-right):
When the mark is not active shift the current line. (Bug#2381)
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index cacd56b6639..7221d8ecb73 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
2008current line. The region shifted includes the lines in which START and 2008current line. The region shifted includes the lines in which START and
2009END lie. It is an error if any lines in the region are indented less than 2009END lie. It is an error if any lines in the region are indented less than
2010COUNT columns." 2010COUNT columns."
2011 (interactive (if mark-active 2011 (interactive
2012 (list (region-beginning) (region-end) current-prefix-arg) 2012 (if mark-active
2013 (list (point) (point) current-prefix-arg))) 2013 (list (region-beginning) (region-end) current-prefix-arg)
2014 (list (line-beginning-position) (line-end-position) current-prefix-arg)))
2014 (if count 2015 (if count
2015 (setq count (prefix-numeric-value count)) 2016 (setq count (prefix-numeric-value count))
2016 (setq count python-indent)) 2017 (setq count python-indent))
@@ -2031,9 +2032,10 @@ COUNT columns."
2031COUNT defaults to `python-indent'. If region isn't active, just shift 2032COUNT defaults to `python-indent'. If region isn't active, just shift
2032current line. The region shifted includes the lines in which START and 2033current line. The region shifted includes the lines in which START and
2033END lie." 2034END lie."
2034 (interactive (if mark-active 2035 (interactive
2035 (list (region-beginning) (region-end) current-prefix-arg) 2036 (if mark-active
2036 (list (point) (point) current-prefix-arg))) 2037 (list (region-beginning) (region-end) current-prefix-arg)
2038 (list (line-beginning-position) (line-end-position) current-prefix-arg)))
2037 (if count 2039 (if count
2038 (setq count (prefix-numeric-value count)) 2040 (setq count (prefix-numeric-value count))
2039 (setq count python-indent)) 2041 (setq count python-indent))