 	 (move-to-indentation-p (<= (current-column) ci))
 	 (need (py-compute-indentation)))
     ;; see if we need to outdent
-    (if (save-excursion
-	  (and (progn (back-to-indentation)
-		      (looking-at py-outdent-re))
-	       (progn (backward-to-indentation 1)
-		      (not (looking-at py-no-outdent-re)))))
+    (if (py-outdent-p)
 	(setq need (- need py-indent-offset)))
     (if (/= ci need)
 	(save-excursion


;; electric characters
(defun py-electric-colon (arg)
  "Insert a colon.
In certain cases the line is outdented appropriately.  If a numeric

;; LCD Archive Entry:
;; python-mode|Barry A. Warsaw|bwarsaw@cnri.reston.va.us
;; |Major mode for editing Python programs
;; |1995/03/14 22:05:53|2.13|

;;; Code:

