Commit 413712cc authored by Barry Warsaw's avatar Barry Warsaw

(py-beginning-of-def-or-class): Only move to match-beginning if the

regex match actually succeeded!
parent c1a2fabe
...@@ -2164,8 +2164,8 @@ To mark the current `def', see `\\[py-mark-def-or-class]'." ...@@ -2164,8 +2164,8 @@ To mark the current `def', see `\\[py-mark-def-or-class]'."
(zerop (current-column)) (zerop (current-column))
(looking-at start-re)) (looking-at start-re))
(end-of-line)) (end-of-line))
(re-search-backward start-re nil 'move count) (if (re-search-backward start-re nil 'move count)
(goto-char (match-beginning 0)))) (goto-char (match-beginning 0)))))
;; Backwards compatibility ;; Backwards compatibility
(defalias 'beginning-of-python-def-or-class 'py-beginning-of-def-or-class) (defalias 'beginning-of-python-def-or-class 'py-beginning-of-def-or-class)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment