GNU bug report logs - #50785
28.0.50; error doesn't use help-key-binding face from substitute-command-keys

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Fri, 24 Sep 2021 18:34:02 UTC

Severity: minor

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50785 <at> debbugs.gnu.org
Subject: bug#50785: 28.0.50; error doesn't use help-key-binding face from substitute-command-keys
Date: Mon, 29 Aug 2022 10:32:45 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> 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?

That's the fix we've used on a Lisp level -- avoiding `princ' in favor
of `insert', etc.

Perhaps it would be nice with a `princ' that preserves text properties?




This bug report was last modified 2 years and 293 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.