]> granicus.if.org Git - python/commitdiff
(py-shell): Remove support for Emacs 18, implicitly add support for
authorBarry Warsaw <barry@python.org>
Thu, 10 Jul 1997 15:58:36 +0000 (15:58 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 10 Jul 1997 15:58:36 +0000 (15:58 +0000)
Emacs 20, and bind TAB key to self-insert-command in *Python* process.

Misc/python-mode.el

index 9f887985b7debe5d5537dead5329ec67a388749b..07876302aca9b178d23feb5b597ee14b1f5e839a 100644 (file)
@@ -867,21 +867,13 @@ filter."
   ;; BAW - should undo be disabled in the python process buffer, if
   ;; this bug still exists?
   (interactive)
-  (if py-this-is-emacs-19-p
-      (progn
-       (require 'comint)
-       (switch-to-buffer-other-window
-        (make-comint "Python" py-python-command)))
-    (progn
-      (require 'shell)
-      (switch-to-buffer-other-window
-       (apply (if (fboundp 'make-shell) 'make-shell 'make-comint)
-             "Python" py-python-command nil))))
-  (make-local-variable 'shell-prompt-pattern)
-  (setq shell-prompt-pattern "^>>> \\|^\\.\\.\\. ")
-  (set-process-filter (get-buffer-process (current-buffer))
-                     'py-process-filter)
-  (set-syntax-table py-mode-syntax-table))
+  (require 'comint)
+  (switch-to-buffer-other-window (make-comint "Python" py-python-command))
+  (make-local-variable 'comint-prompt-regexp)
+  (setq comint-prompt-regexp "^>>> \\|^[.][.][.] ")
+  (set-process-filter (get-buffer-process (current-buffer)) 'py-process-filter)
+  (set-syntax-table py-mode-syntax-table)
+  (local-set-key [tab] 'self-insert-command))
 
 (defun py-execute-region (start end)
   "Send the region between START and END to a Python interpreter.