 
 ;; Copyright (C) 1992,1993,1994  Tim Peters
 
-;; Author: 1995-2001 Barry A. Warsaw
+;; Author: 1995-2002 Barry A. Warsaw
 ;;         1992-1994 Tim Peters
 ;; Maintainer: python-mode@python.org
 ;; Created:    Feb 1992

      (setq py-exception-buffer (cons file (current-buffer))))
     (t
      ;; TBD: a horrible hack, buy why create new Custom variables?
      (let ((cmd (concat py-which-shell
			 (if (string-equal py-which-bufname "JPython")
			     " -" ""))))
	;; otherwise either run it synchronously in a subprocess

			 (format "python-%d-%d" sn pid)
		       (format "python-%d" sn)))
		 (make-temp-name "python-")))
	 (file (concat (expand-file-name temp py-temp-directory) ".py"))
	 (cur (current-buffer))
	 (buf (get-buffer-create file))
	 shell)
    ;; Write the contents of the buffer, watching out for indented regions.
    (save-excursion
      (goto-char start)
      (let ((needs-if (/= (py-point 'bol) (py-point 'boi))))
	(set-buffer buf)
	(python-mode)
	(setq shell py-which-shell)
	(when needs-if
	  (insert "if 1:\n"))
	(insert-buffer-substring cur start end)))
