Mercurial > cpython-lru_cache-weakref
diff Misc/python-mode.el @ 5757:8c0f747f1141 legacy-trunk
(py-shell): Remove support for Emacs 18, implicitly add support for
Emacs 20, and bind TAB key to self-insert-command in *Python* process.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Thu, 10 Jul 1997 15:58:36 +0000 |
| parents | 4665e2849a4a |
| children | 8ae83b9c34a0 |
line wrap: on
line diff
--- a/Misc/python-mode.el Thu Jul 10 15:14:50 1997 +0000 +++ b/Misc/python-mode.el Thu Jul 10 15:58:36 1997 +0000 @@ -867,21 +867,13 @@ ;; 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.
