]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
(py-shell): Set the default shell if not set yet. It's sometimes
authorBarry Warsaw <barry@python.org>
Tue, 10 Aug 1999 21:49:00 +0000 (21:49 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 10 Aug 1999 21:49:00 +0000 (21:49 +0000)
convenient to call py-shell before the first Python file has been
visited.

Misc/python-mode.el

index d7818f1c2782816c4a7cc8638fb8b34df9f78a11..0dbf202113d3faddef526051c16f12421081a25f 100644 (file)
@@ -1207,6 +1207,9 @@ interaction between undo and process filters; the same problem exists in
 non-Python process buffers using the default (Emacs-supplied) process
 filter."
   (interactive "P")
+  ;; Set the default shell if not already set
+  (when (null py-which-shell)
+    (py-toggle-shells py-default-interpreter))
   (let ((args py-which-args))
     (when (and argprompt
               (interactive-p)