aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2025-06-26 00:02:59 +0800
committerPo Lu2025-06-26 00:02:59 +0800
commit9ebcbf93ba43e1e91910d34e800ef8000dae2cdd (patch)
treede86e05a999f6fc767ef8d2de39c50fdcf4ea61c
parent704832f41b9ebf1cb2bef5f8cba4ab00fa31520f (diff)
parentd05b59c8be5f350497ca142bc94ade23c568ad15 (diff)
downloademacs-9ebcbf93ba43e1e91910d34e800ef8000dae2cdd.tar.gz
emacs-9ebcbf93ba43e1e91910d34e800ef8000dae2cdd.zip
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs
-rw-r--r--doc/emacs/misc.texi20
-rw-r--r--lisp/comint.el10
2 files changed, 21 insertions, 9 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 80bfb1a103d..88b7bfc7049 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -997,6 +997,10 @@ from. For example, if you use bash, the file sent to it is
997@file{~/.emacs_bash}. If this file is not found, Emacs tries with 997@file{~/.emacs_bash}. If this file is not found, Emacs tries with
998@file{~/.emacs.d/init_@var{shellname}.sh}. 998@file{~/.emacs.d/init_@var{shellname}.sh}.
999 999
1000 You can enable colorized output for many commands by customizing the
1001variable @code{comint-terminfo-terminal} to the value
1002@samp{"dumb-emacs-ansi"} (@pxref{Shell Options}).
1003
1000 To specify a coding system for the shell, you can use the command 1004 To specify a coding system for the shell, you can use the command
1001@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can 1005@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can
1002also change the coding system for a running subshell by typing 1006also change the coding system for a running subshell by typing
@@ -1639,13 +1643,15 @@ underlying shell, of course.
1639@vindex system-uses-terminfo 1643@vindex system-uses-terminfo
1640@vindex TERM@r{, environment variable, in sub-shell} 1644@vindex TERM@r{, environment variable, in sub-shell}
1641Comint mode sets the @env{TERM} environment variable to a safe default 1645Comint mode sets the @env{TERM} environment variable to a safe default
1642value, but this value disables some useful features. For example, 1646value, but this disables some useful features. For example, colorized
1643color is disabled in applications that use @env{TERM} to determine if 1647output is disabled in applications that use @env{TERM} to determine
1644color is supported. Therefore, Emacs provides an option 1648whether color is supported. If the terminfo database on your system
1645@code{comint-terminfo-terminal} to let you choose a terminal with more 1649contains a definition for the @samp{"dumb-emacs-ansi"} terminal type (as
1646advanced features, as defined in your system's terminfo database. 1650all recent versions of terminfo do), you can enable advanced terminal
1647Emacs will use this option as the value for @env{TERM} so long as 1651features, including color, by customizing the option
1648@code{system-uses-terminfo} is non-@code{nil}. 1652@code{comint-terminfo-terminal} to @samp{"dumb-emacs-ansi"}. Emacs will
1653use @code{comint-terminfo-terminal} as the value for @env{TERM} so long
1654as @code{system-uses-terminfo} is non-@code{nil}.
1649 1655
1650Both @code{comint-terminfo-terminal} and @code{system-uses-terminfo} 1656Both @code{comint-terminfo-terminal} and @code{system-uses-terminfo}
1651can be declared as connection-local variables to adjust these options 1657can be declared as connection-local variables to adjust these options
diff --git a/lisp/comint.el b/lisp/comint.el
index 56a28f6ae99..b9c910eff43 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -523,8 +523,14 @@ executed once, when the buffer is created."
523 :group 'comint) 523 :group 'comint)
524 524
525(defcustom comint-terminfo-terminal "dumb" 525(defcustom comint-terminfo-terminal "dumb"
526 "Value to use for TERM when the system uses terminfo." 526 "Value to use for TERM when the system uses terminfo.
527 :type 'string 527If the system's terminfo database contains a definition for the
528\"dumb-emacs-ansi\" terminal (as all recent versions of terminfo do),
529set this to \"dumb-emacs-ansi\" and then some terminfo-aware programs
530will send colorized output when run under Comint."
531 :type '(choice (const "dumb")
532 (const "dumb-emacs-ansi")
533 string)
528 :group 'comint 534 :group 'comint
529 :version "26.1") 535 :version "26.1")
530 536