diff options
author | Carlos Pita <carlosjosepita@gmail.com> | 2020-08-19 13:13:46 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-19 13:13:46 +0200 |
commit | c570a79a77add5482826b42912d3fe95edc9b146 (patch) | |
tree | 1ebbb06d4ca4470c2f6fe56523cb9104f3ba1c4c /lisp/comint.el | |
parent | 9e586ac1d1b3bbabbd73a119698df742c0bfa523 (diff) | |
download | emacs-c570a79a77add5482826b42912d3fe95edc9b146.tar.gz emacs-c570a79a77add5482826b42912d3fe95edc9b146.tar.bz2 emacs-c570a79a77add5482826b42912d3fe95edc9b146.zip |
Don't override python font locking in comint
* lisp/comint.el (comint-highlight-input): New variable (bug#32344).
(comint-send-input): Use it.
* lisp/progmodes/python.el (inferior-python-mode): Set it.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index df4937a7d6f..4094969ae8e 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -223,6 +223,12 @@ This variable is buffer-local." (other :tag "on" t)) :group 'comint) +(defcustom comint-highlight-input t + "If non-nil, highlight input with `comint-highlight-input' face. +Otherwise keep the original highlighting untouched." + :type 'boolean + :group 'comint) + (defface comint-highlight-input '((t (:weight bold))) "Face to use to highlight user input." :group 'comint) @@ -1897,9 +1903,10 @@ Similarly for Soar, Scheme, etc." (end (if no-newline (point) (1- (point))))) (with-silent-modifications (when (> end beg) - (add-text-properties beg end - '(front-sticky t - font-lock-face comint-highlight-input)) + (when comint-highlight-input + (add-text-properties beg end + '(front-sticky t + font-lock-face comint-highlight-input))) (unless comint-use-prompt-regexp ;; Give old user input a field property of `input', to ;; distinguish it from both process output and unsent |