From f54de22e65df1f0f0345efce4d6fd3487d0f7bb5 Mon Sep 17 00:00:00 2001 From: Nathan Trapuzzano Date: Thu, 12 Dec 2013 00:47:41 -0300 Subject: * lisp/progmodes/python.el (python-indent-calculate-indentation): When determining indentation, don't treat "return", "pass", etc., as operators when they are just string constituents. * automated/python-test.el (python-indent-block-enders-1): Rename from python-indent-block-enders. (python-indent-block-enders-2): New test. Fixes: debbugs:15812 --- lisp/progmodes/python.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/progmodes/python.el') diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 3e0708cd3c2..669da135644 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -774,7 +774,7 @@ START is the buffer position where the sexp starts." (save-excursion (python-util-forward-comment -1) (python-nav-beginning-of-statement) - (member (current-word) python-indent-block-enders))) + (looking-at (regexp-opt python-indent-block-enders)))) python-indent-offset 0))) ;; When inside of a string, do nothing. just use the current -- cgit v1.2.1