Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't use next-line and previous-line non-interactively.

 - use forward-line instead
  • Loading branch information...
commit 21aa8f1aee913290d2b5f9ba8f540b3b507c9ca8 1 parent a182112
@magnars magnars authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 python-mode-expansions.el
View
12 python-mode-expansions.el
@@ -72,7 +72,7 @@ find the beginning of the surrounding block because
`py-beginning-of-block-position' just looks for the previous
block-starting key word syntactically."
(while (> (current-column) (- start-column py-indent-offset))
- (previous-line)
+ (forward-line -1)
(py-beginning-of-block)))
(defun er/mark-outer-python-block ()
@@ -100,15 +100,15 @@ line and selecting the surrounding block."
(py-mark-block-or-clause)
(setq start-col (current-column))
(while (looking-at secondary-re)
- (previous-line) (back-to-indentation)
+ (forward-line -1) (back-to-indentation)
(while (> (current-column) start-col)
- (previous-line) (back-to-indentation)))
+ (forward-line -1) (back-to-indentation)))
(set-mark (point))
- (py-goto-beyond-clause) (next-line) (back-to-indentation)
+ (py-goto-beyond-clause) (forward-line) (back-to-indentation)
(while (and (looking-at secondary-re)
(>= (current-column) start-col))
- (py-goto-beyond-clause) (next-line) (back-to-indentation))
- (previous-line) (end-of-line)
+ (py-goto-beyond-clause) (forward-line) (back-to-indentation))
+ (forward-line -1) (end-of-line)
(exchange-point-and-mark))))
(defun er/add-python-mode-expansions ()
Please sign in to comment.
Something went wrong with that request. Please try again.