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

;;         1992-1994 Tim Peters <tim@ksr.com>
;; Maintainer:    bwarsaw@cnri.reston.va.us
;; Created:       Feb 1992
;; Version:       2.11
;; Last Modified: 1995/03/14 18:32:54
;; Keywords: python editing language major-mode

;; This software is provided as-is, without express or implied



(defconst py-version "2.12"
  "`python-mode' version number.")
(defconst py-help-address "bwarsaw@cnri.reston.va.us"
  "Address accepting submission of bug reports.")
