From: Fabián Ezequiel Gallina Date: Thu, 17 May 2012 03:03:04 +0000 (-0300) Subject: Small fix to python-indent-electric-colon X-Git-Tag: emacs-24.2.90~1199^2~597 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=76eefb1fe574c776c21282691aacc6fea3475abe;p=emacs.git Small fix to python-indent-electric-colon Check current indentation is greater than the current calculated indentation. --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 76546aa9799..3863a9f851e 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -797,6 +797,7 @@ just insert a single colon." (and (not arg) (eolp) (not (nth 8 (syntax-ppss))) + (> (current-indentation) (python-indent-calculate-indentation)) (save-excursion (python-indent-line)))) (put 'python-indent-electric-colon 'delete-selection t)