aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/comint.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el16
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index c3cb439d8b8..092902d865e 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -223,6 +223,13 @@ This variable is buffer-local."
223 (other :tag "on" t)) 223 (other :tag "on" t))
224 :group 'comint) 224 :group 'comint)
225 225
226(defcustom comint-highlight-input t
227 "If non-nil, highlight input with `comint-highlight-input' face.
228Otherwise keep the original highlighting untouched."
229 :version "28.1"
230 :type 'boolean
231 :group 'comint)
232
226(defface comint-highlight-input '((t (:weight bold))) 233(defface comint-highlight-input '((t (:weight bold)))
227 "Face to use to highlight user input." 234 "Face to use to highlight user input."
228 :group 'comint) 235 :group 'comint)
@@ -1897,9 +1904,10 @@ Similarly for Soar, Scheme, etc."
1897 (end (if no-newline (point) (1- (point))))) 1904 (end (if no-newline (point) (1- (point)))))
1898 (with-silent-modifications 1905 (with-silent-modifications
1899 (when (> end beg) 1906 (when (> end beg)
1900 (add-text-properties beg end 1907 (when comint-highlight-input
1901 '(front-sticky t 1908 (add-text-properties beg end
1902 font-lock-face comint-highlight-input)) 1909 '( font-lock-face comint-highlight-input
1910 front-sticky t )))
1903 (unless comint-use-prompt-regexp 1911 (unless comint-use-prompt-regexp
1904 ;; Give old user input a field property of `input', to 1912 ;; Give old user input a field property of `input', to
1905 ;; distinguish it from both process output and unsent 1913 ;; distinguish it from both process output and unsent
@@ -3852,7 +3860,7 @@ REGEXP-GROUP is the regular expression group in REGEXP to use."
3852 (set-buffer output-buffer) 3860 (set-buffer output-buffer)
3853 (goto-char (point-min)) 3861 (goto-char (point-min))
3854 ;; Skip past the command, if it was echoed 3862 ;; Skip past the command, if it was echoed
3855 (and (looking-at command) 3863 (and (looking-at (regexp-quote command))
3856 (forward-line)) 3864 (forward-line))
3857 (while (and (not (eobp)) 3865 (while (and (not (eobp))
3858 (re-search-forward regexp nil t)) 3866 (re-search-forward regexp nil t))