From: Fabián Ezequiel Gallina Date: Mon, 28 Jul 2014 21:07:10 +0000 (-0300) Subject: * lisp/progmodes/python.el (inferior-python-mode): Make input prompts X-Git-Tag: emacs-25.0.90~2636^3~11 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6628be853e521167ca1dddbfc687cf27c486dad2;p=emacs.git * lisp/progmodes/python.el (inferior-python-mode): Make input prompts read-only. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fbbce6e4db7..4a54d4e2df6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-07-28 Fabián Ezequiel Gallina + + * progmodes/python.el (inferior-python-mode): Make input prompts + read-only. + 2014-07-28 Emilio C. Lopes * net/tramp-sh.el (tramp-get-remote-python): Also search for diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index b08da8da029..d1dd9bef4bc 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2357,7 +2357,8 @@ variable. (set (make-local-variable 'python-shell--prompt-calculated-input-regexp) nil) (set (make-local-variable 'python-shell--prompt-calculated-output-regexp) nil) (python-shell-prompt-set-calculated-regexps) - (setq comint-prompt-regexp python-shell--prompt-calculated-input-regexp) + (setq comint-prompt-regexp python-shell--prompt-calculated-input-regexp + comint-prompt-read-only t) (setq mode-line-process '(":%s")) (set (make-local-variable 'comint-output-filter-functions) '(ansi-color-process-output @@ -2381,6 +2382,10 @@ variable. (compilation-shell-minor-mode 1) ;; Ensure all the output is accepted before running any hooks. (accept-process-output (get-buffer-process (current-buffer))) + ;; At this point, all process output should have been received, but + ;; on GNU/Linux, calling `python-shell-internal-send-string' without + ;; a running internal shell fails to grab output properly unless + ;; this `sit-for' is in place. (sit-for 0.1 t)) (defun python-shell-make-comint (cmd proc-name &optional pop internal)