mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
(py-shell): Remove support for Emacs 18, implicitly add support for
Emacs 20, and bind TAB key to self-insert-command in *Python* process.
This commit is contained in:
parent
d247812521
commit
e6648967b7
1 changed files with 7 additions and 15 deletions
|
|
@ -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
|
(require 'comint)
|
||||||
(progn
|
(switch-to-buffer-other-window (make-comint "Python" py-python-command))
|
||||||
(require 'comint)
|
(make-local-variable 'comint-prompt-regexp)
|
||||||
(switch-to-buffer-other-window
|
(setq comint-prompt-regexp "^>>> \\|^[.][.][.] ")
|
||||||
(make-comint "Python" py-python-command)))
|
(set-process-filter (get-buffer-process (current-buffer)) 'py-process-filter)
|
||||||
(progn
|
(set-syntax-table py-mode-syntax-table)
|
||||||
(require 'shell)
|
(local-set-key [tab] 'self-insert-command))
|
||||||
(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))
|
|
||||||
|
|
||||||
(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.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue