Commit e6648967 authored by Barry Warsaw's avatar Barry Warsaw

(py-shell): Remove support for Emacs 18, implicitly add support for

Emacs 20, and bind TAB key to self-insert-command in *Python* process.
parent d2478125
...@@ -867,21 +867,13 @@ filter." ...@@ -867,21 +867,13 @@ filter."
;; BAW - should undo be disabled in the python process buffer, if ;; BAW - should undo be disabled in the python process buffer, if
;; this bug still exists? ;; this bug still exists?
(interactive) (interactive)
(if py-this-is-emacs-19-p
(progn
(require 'comint) (require 'comint)
(switch-to-buffer-other-window (switch-to-buffer-other-window (make-comint "Python" py-python-command))
(make-comint "Python" py-python-command))) (make-local-variable 'comint-prompt-regexp)
(progn (setq comint-prompt-regexp "^>>> \\|^[.][.][.] ")
(require 'shell) (set-process-filter (get-buffer-process (current-buffer)) 'py-process-filter)
(switch-to-buffer-other-window (set-syntax-table py-mode-syntax-table)
(apply (if (fboundp 'make-shell) 'make-shell 'make-comint) (local-set-key [tab] 'self-insert-command))
"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))
(defun py-execute-region (start end) (defun py-execute-region (start end)
"Send the region between START and END to a Python interpreter. "Send the region between START and END to a Python interpreter.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment