aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el14
1 files changed, 4 insertions, 10 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 5bf64c18f99..ff805d64024 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -229,15 +229,9 @@
229(defvar python-mode-map 229(defvar python-mode-map
230 (let ((map (make-sparse-keymap))) 230 (let ((map (make-sparse-keymap)))
231 ;; Movement 231 ;; Movement
232 (substitute-key-definition 'backward-sentence 232 (define-key map [remap backward-sentence] 'python-nav-backward-block)
233 'python-nav-backward-block 233 (define-key map [remap forward-sentence] 'python-nav-forward-block)
234 map global-map) 234 (define-key map [remap backward-up-list] 'python-nav-backward-up-list)
235 (substitute-key-definition 'forward-sentence
236 'python-nav-forward-block
237 map global-map)
238 (substitute-key-definition 'backward-up-list
239 'python-nav-backward-up-list
240 map global-map)
241 (define-key map "\C-c\C-j" 'imenu) 235 (define-key map "\C-c\C-j" 'imenu)
242 ;; Indent specific 236 ;; Indent specific
243 (define-key map "\177" 'python-indent-dedent-line-backspace) 237 (define-key map "\177" 'python-indent-dedent-line-backspace)
@@ -1444,7 +1438,7 @@ DIR is always 1 or -1 and comes sanitized from
1444 (save-excursion 1438 (save-excursion
1445 (let ((indentation (current-indentation))) 1439 (let ((indentation (current-indentation)))
1446 (while (and (python-nav-backward-block) 1440 (while (and (python-nav-backward-block)
1447 (> (current-indentation) indentation)))) 1441 (>= (current-indentation) indentation))))
1448 (point)))) 1442 (point))))
1449 (and (> (point) prev-block-pos) 1443 (and (> (point) prev-block-pos)
1450 (goto-char prev-block-pos)))) 1444 (goto-char prev-block-pos))))