summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1997-07-10 15:58:36 (GMT)
committerBarry Warsaw <barry@python.org>1997-07-10 15:58:36 (GMT)
commite6648967b703c5f8ee24c23d25be2d5ce5f963d5 (patch)
tree3b6f4ed46ea845d72e2d7005a5f07ea7d4790d1e /Misc
parentd247812521c2f020093d98807da3bcc39e233581 (diff)
downloadcpython-e6648967b703c5f8ee24c23d25be2d5ce5f963d5.zip
cpython-e6648967b703c5f8ee24c23d25be2d5ce5f963d5.tar.gz
cpython-e6648967b703c5f8ee24c23d25be2d5ce5f963d5.tar.bz2
(py-shell): Remove support for Emacs 18, implicitly add support for
Emacs 20, and bind TAB key to self-insert-command in *Python* process.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el22
1 files changed, 7 insertions, 15 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 9f88798..0787630 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -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.