summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorNathan Trapuzzano <nbtrap@nbtrap.com>2013-12-12 00:47:41 -0300
committerFabián Ezequiel Gallina <fgallina@gnu.org>2013-12-12 00:47:41 -0300
commitf54de22e65df1f0f0345efce4d6fd3487d0f7bb5 (patch)
tree6d409273d9641c2882505033c3ab0e9a50751e35 /lisp
parent6cc4c89b6c45496cc63b3e0cee0971dc1a914015 (diff)
downloademacs-f54de22e65df1f0f0345efce4d6fd3487d0f7bb5.tar.gz
emacs-f54de22e65df1f0f0345efce4d6fd3487d0f7bb5.tar.bz2
emacs-f54de22e65df1f0f0345efce4d6fd3487d0f7bb5.zip
* 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
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/python.el2
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7ec6750720b..c18e0a6a133 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-12 Nathan Trapuzzano <nbtrap@nbtrap.com>
+
+ * progmodes/python.el (python-indent-calculate-indentation): When
+ determining indentation, don't treat "return", "pass", etc., as
+ operators when they are just string constituents. (Bug#15812)
+
2013-12-12 Juri Linkov <juri@jurta.org>
* uniquify.el (uniquify-buffer-name-style): Change default to
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