bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50785: 28.0.50; error doesn't use help-key-binding face from substit


From: Lars Ingebrigtsen
Subject: bug#50785: 28.0.50; error doesn't use help-key-binding face from substitute-command-keys
Date: Mon, 29 Aug 2022 18:29:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Hm...  is `error' stripping text properties before displaying, by any
> chance?  If so, is there any particular reason why that would make sense
> in general?  Hm...  perhaps the idea is that `error' is used in
> low-level circumstances, so we don't want to rely on faces etc actually
> working?
>
> Anybody know?

The error message are output (by default) by print_error_message.  It
simply does `princ' on the string with a PRINTCHARFUN of t, which is the
minibuffer.  And if you do that, then you lose the text properties:

(defun foo2 ()
  (interactive)
  (princ (substitute-command-keys "Use \\[next-line]") t))

We probably don't want to change something as fundamental as that, so if
we want to fix this, we have to change print_error_message to just call
Fmessage instead, I guess?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]