1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-18 18:05:07 +00:00

Enhancements to `python-end-of-defun-function' so it's not blocked by top level assignments (fixes #64)

This commit is contained in:
Fabián Ezequiel Gallina 2012-05-17 00:03:43 -03:00 committed by Fabián Ezequiel Gallina
parent a7a6d8ff0e
commit 0d85f46527

View File

@ -1080,12 +1080,9 @@ Returns nil if point is not in a def or class."
(while (and (forward-line 1)
(not (eobp))
(or (not (current-word))
;; This checks if the indentation is less than the base
;; one and if the line is not a comment
(or (> (current-indentation) beg-defun-indent)
(equal
(char-after
(+ (point) (current-indentation))) ?#)))))
(equal (char-after (+ (point) (current-indentation))) ?#)
(> (current-indentation) beg-defun-indent)
(not (looking-at python-nav-beginning-of-defun-regexp)))))
(python-util-forward-comment)
(goto-char (line-beginning-position))))