summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1996-03-25 21:24:26 (GMT)
committerBarry Warsaw <barry@python.org>1996-03-25 21:24:26 (GMT)
commit5f204775bf9eac0dbda8363eb3bde8923f61771f (patch)
tree9eada46de136c0fdb23dec9774b4eb234522a4e1 /Misc
parentcce074e2730809aa1178135e1a0b2bdfba491611 (diff)
downloadcpython-5f204775bf9eac0dbda8363eb3bde8923f61771f.zip
cpython-5f204775bf9eac0dbda8363eb3bde8923f61771f.tar.gz
cpython-5f204775bf9eac0dbda8363eb3bde8923f61771f.tar.bz2
(py-indent-right, py-outdent-left): Watch out for (mark) returning
nil.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 854e3f9..7f59c31 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -502,8 +502,11 @@ farther right than the distance the line would be indented by
current line."
(interactive
(let ((p (point))
- (m (mark)))
- (list (min p m) (max p m) (prefix-numeric-value current-prefix-arg))))
+ (m (mark))
+ (arg (prefix-numeric-value current-prefix-arg)))
+ (if m
+ (list (min p m) (max p m) arg)
+ (list p m arg))))
(let ((pos (- (point-max) (point)))
(end (save-excursion
(goto-char (or end (1+ start)))
@@ -535,8 +538,11 @@ farther left than column zero. With no active region, outdent only
the current line."
(interactive
(let ((p (point))
- (m (mark)))
- (list (min p m) (max p m) (prefix-numeric-value current-prefix-arg))))
+ (m (mark))
+ (arg (prefix-numeric-value current-prefix-arg)))
+ (if m
+ (list (min p m) (max p m) arg)
+ (list p m arg))))
(let ((pos (- (point-max) (point)))
(end (save-excursion
(goto-char (or end (1+ start)))