From 22de4b1e724da7ceadc117c0d4611ecf4bf589d1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 23 Mar 2023 10:03:04 +0200 Subject: ; Describe problems with 'screen' and COLORTERM variable * etc/PROBLEMS: Describe the issue with 'screen' and COLORTERM=truecolor. (Bug#62237) --- etc/PROBLEMS | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'etc') diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 69c42e9bed0..3c75e81b8b9 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2293,6 +2293,33 @@ recommended way of turning on Font-lock is by typing "M-x global-font-lock-mode RET" or by customizing the variable 'global-font-lock-mode'. +** Colors are not available or messed up on TTY frames inside 'screen'. + +This can happen if you have COLORTERM=truecolor defined in the +environment when Emacs starts, but your version of 'screen' doesn't +actually support 24-bit true colors. + +The COLORTERM environment variable is supposed to be set to the value +"truecolor" only if the terminal used by Emacs actually supports true +color. Emacs does not have any means of verifying that this support +is available, it takes the fact that the variable is defined to this +value as an indication that true color support is, in fact, available, +and uses color setting commands that COLORTERM=truecolor presumes, +bypassing the usual Terminfo capabilities related to colors. + +Some text-mode terminals, such as GNOME Terminal, are known to set +this environment variable, supposedly to announce their own support +for true color; however the setting is then inherited by any other +terminal emulators started from such a terminal, even though those +other terminal emulators might not themselves support true color using +the same commands as Emacs uses when it sees COLORTERM=truecolor. + +The solution is to either upgrade to a newer version of 'screen' +(version 5.x or later reportedly supports true color), or to unset the +COLORTERM variable before starting 'screen', and let Emacs use the +color support provided by the terminal emulator as defined in the +Terminfo database. + ** Unexpected characters inserted into the buffer when you start Emacs. See e.g. -- cgit v1.2.3 From 19c95b141606282915ed6c1a3f2c42a6b7a4420b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 23 Mar 2023 10:31:56 +0200 Subject: Allow showing prefix commands in Help buffers * lisp/help.el (describe-bindings-show-prefix-commands): New user option. (describe-map): Use it to decide whether to output prefix commands. Patch by Bob Rogers . (Bug#62279) * etc/NEWS: Document 'describe-bindings-show-prefix-commands'. --- etc/NEWS | 8 +++++--- lisp/help.el | 7 +++++++ 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/NEWS b/etc/NEWS index 0b651f7a519..d7a6cf7986d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3565,11 +3565,13 @@ font spec. In these cases, replacing ":weight 'normal" with ":weight 'medium" should fix the issue. --- -** Keymap descriptions have changed. +** Keymap descriptions by Help commands have changed. 'help--describe-command', 'C-h b' and associated functions that output keymap descriptions have changed. In particular, prefix commands are -not output at all, and instead of "??" for closures/functions, -"[closure]"/"[lambda]" is output. +not output at all, and instead of "??" for closures/functions, these +functions output "[closure]"/"[lambda]". You can get back the old +behavior of including prefix commands by customizing the new option +'describe-bindings-show-prefix-commands' to a non-nil value. --- ** 'downcase' details have changed slightly. diff --git a/lisp/help.el b/lisp/help.el index 83be85b1ee4..3e94b5046e5 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -717,6 +717,12 @@ Return nil if KEYS is nil." :group 'help :version "29.1") +(defcustom describe-bindings-show-prefix-commands nil + "Non-nil means show prefix commands in the output of `describe-bindings'." + :type 'boolean + :group 'help + :version "29.1") + (declare-function outline-hide-subtree "outline") (defun describe-bindings (&optional prefix buffer) @@ -1699,6 +1705,7 @@ in `describe-map-tree'." (setq vect (cdr vect)) (setq end (caar vect)))) (when (or (not (eq start end)) + describe-bindings-show-prefix-commands ;; Don't output keymap prefixes. (not (keymapp definition))) (when first -- cgit v1.2.3