mirror of
https://github.com/python/cpython.git
synced 2025-10-24 23:46:23 +00:00
(py-indent-right, py-outdent-left): Watch out for (mark) returning
nil.
This commit is contained in:
parent
cce074e273
commit
5f204775bf
1 changed files with 10 additions and 4 deletions
|
|
@ -502,8 +502,11 @@ farther right than the distance the line would be indented by
|
||||||
current line."
|
current line."
|
||||||
(interactive
|
(interactive
|
||||||
(let ((p (point))
|
(let ((p (point))
|
||||||
(m (mark)))
|
(m (mark))
|
||||||
(list (min p m) (max p m) (prefix-numeric-value current-prefix-arg))))
|
(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)))
|
(let ((pos (- (point-max) (point)))
|
||||||
(end (save-excursion
|
(end (save-excursion
|
||||||
(goto-char (or end (1+ start)))
|
(goto-char (or end (1+ start)))
|
||||||
|
|
@ -535,8 +538,11 @@ farther left than column zero. With no active region, outdent only
|
||||||
the current line."
|
the current line."
|
||||||
(interactive
|
(interactive
|
||||||
(let ((p (point))
|
(let ((p (point))
|
||||||
(m (mark)))
|
(m (mark))
|
||||||
(list (min p m) (max p m) (prefix-numeric-value current-prefix-arg))))
|
(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)))
|
(let ((pos (- (point-max) (point)))
|
||||||
(end (save-excursion
|
(end (save-excursion
|
||||||
(goto-char (or end (1+ start)))
|
(goto-char (or end (1+ start)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue