]> git.eshelyaron.com Git - emacs.git/commitdiff
Small fix to python-indent-electric-colon
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:03:04 +0000 (00:03 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:03:04 +0000 (00:03 -0300)
Check current indentation is greater than the current calculated
indentation.

lisp/progmodes/python.el

index 76546aa97993d4f6eced9ac004a4f3e966683be2..3863a9f851e344185f294d3a331d96d3fcefaf1e 100644 (file)
@@ -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)