diff options
| author | Po Lu | 2025-06-26 00:02:59 +0800 |
|---|---|---|
| committer | Po Lu | 2025-06-26 00:02:59 +0800 |
| commit | 9ebcbf93ba43e1e91910d34e800ef8000dae2cdd (patch) | |
| tree | de86e05a999f6fc767ef8d2de39c50fdcf4ea61c | |
| parent | 704832f41b9ebf1cb2bef5f8cba4ab00fa31520f (diff) | |
| parent | d05b59c8be5f350497ca142bc94ade23c568ad15 (diff) | |
| download | emacs-9ebcbf93ba43e1e91910d34e800ef8000dae2cdd.tar.gz emacs-9ebcbf93ba43e1e91910d34e800ef8000dae2cdd.zip | |
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs
| -rw-r--r-- | doc/emacs/misc.texi | 20 | ||||
| -rw-r--r-- | lisp/comint.el | 10 |
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 | ||
| 1001 | variable @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 |
| 1002 | also change the coding system for a running subshell by typing | 1006 | also 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} |
| 1641 | Comint mode sets the @env{TERM} environment variable to a safe default | 1645 | Comint mode sets the @env{TERM} environment variable to a safe default |
| 1642 | value, but this value disables some useful features. For example, | 1646 | value, but this disables some useful features. For example, colorized |
| 1643 | color is disabled in applications that use @env{TERM} to determine if | 1647 | output is disabled in applications that use @env{TERM} to determine |
| 1644 | color is supported. Therefore, Emacs provides an option | 1648 | whether color is supported. If the terminfo database on your system |
| 1645 | @code{comint-terminfo-terminal} to let you choose a terminal with more | 1649 | contains a definition for the @samp{"dumb-emacs-ansi"} terminal type (as |
| 1646 | advanced features, as defined in your system's terminfo database. | 1650 | all recent versions of terminfo do), you can enable advanced terminal |
| 1647 | Emacs will use this option as the value for @env{TERM} so long as | 1651 | features, 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 |
| 1653 | use @code{comint-terminfo-terminal} as the value for @env{TERM} so long | ||
| 1654 | as @code{system-uses-terminfo} is non-@code{nil}. | ||
| 1649 | 1655 | ||
| 1650 | Both @code{comint-terminfo-terminal} and @code{system-uses-terminfo} | 1656 | Both @code{comint-terminfo-terminal} and @code{system-uses-terminfo} |
| 1651 | can be declared as connection-local variables to adjust these options | 1657 | can 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 | 527 | If the system's terminfo database contains a definition for the |
| 528 | \"dumb-emacs-ansi\" terminal (as all recent versions of terminfo do), | ||
| 529 | set this to \"dumb-emacs-ansi\" and then some terminfo-aware programs | ||
| 530 | will 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 | ||