aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorGlenn Morris2014-09-02 21:21:40 -0700
committerGlenn Morris2014-09-02 21:21:40 -0700
commit62fca47221fc9d248511cd94fbcb41ddb46763e6 (patch)
treed039e0d0580f884abbfd7515b63ef7bc4aabeaaa /lisp/progmodes/python.el
parente6769f18909edfd1bbf6473a1f754ab29e2fb114 (diff)
parentaf86b05fd4b79c3d1c3b71c6193c4295a1265594 (diff)
downloademacs-62fca47221fc9d248511cd94fbcb41ddb46763e6.tar.gz
emacs-62fca47221fc9d248511cd94fbcb41ddb46763e6.zip
Merge from emacs-24; up to 2014-07-04T02:28:54Z!dmantipov@yandex.ru
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f12486d0acb..dc38966bcaf 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1162,9 +1162,15 @@ the line will be re-indented automatically if needed."
1162 ((and (eq ?: last-command-event) 1162 ((and (eq ?: last-command-event)
1163 (memq ?: electric-indent-chars) 1163 (memq ?: electric-indent-chars)
1164 (not current-prefix-arg) 1164 (not current-prefix-arg)
1165 ;; Trigger electric colon only at end of line
1165 (eolp) 1166 (eolp)
1167 ;; Avoid re-indenting on extra colon
1166 (not (equal ?: (char-before (1- (point))))) 1168 (not (equal ?: (char-before (1- (point)))))
1167 (not (python-syntax-comment-or-string-p))) 1169 (not (python-syntax-comment-or-string-p))
1170 ;; Never re-indent at beginning of defun
1171 (not (save-excursion
1172 (python-nav-beginning-of-statement)
1173 (python-info-looking-at-beginning-of-defun))))
1168 (python-indent-line))))) 1174 (python-indent-line)))))
1169 1175
1170 1176