aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorFabián Ezequiel Gallina2012-05-17 00:03:43 -0300
committerFabián Ezequiel Gallina2012-05-17 00:03:43 -0300
commit0d85f46527ddbe40510181c025a67bd819d208b3 (patch)
treee1aa5a2aeaa82c290c2803bc0db1076174bdc05c /lisp/progmodes/python.el
parenta7a6d8ff0ecb3059225ed1eb4d61e941d2afeb4c (diff)
downloademacs-0d85f46527ddbe40510181c025a67bd819d208b3.tar.gz
emacs-0d85f46527ddbe40510181c025a67bd819d208b3.zip
Enhancements to `python-end-of-defun-function' so it's not blocked by top level assignments (fixes #64)
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el9
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 3c1e85834de..71c5453ee2d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1080,12 +1080,9 @@ Returns nil if point is not in a def or class."
1080 (while (and (forward-line 1) 1080 (while (and (forward-line 1)
1081 (not (eobp)) 1081 (not (eobp))
1082 (or (not (current-word)) 1082 (or (not (current-word))
1083 ;; This checks if the indentation is less than the base 1083 (equal (char-after (+ (point) (current-indentation))) ?#)
1084 ;; one and if the line is not a comment 1084 (> (current-indentation) beg-defun-indent)
1085 (or (> (current-indentation) beg-defun-indent) 1085 (not (looking-at python-nav-beginning-of-defun-regexp)))))
1086 (equal
1087 (char-after
1088 (+ (point) (current-indentation))) ?#)))))
1089 (python-util-forward-comment) 1086 (python-util-forward-comment)
1090 (goto-char (line-beginning-position)))) 1087 (goto-char (line-beginning-position))))
1091 1088