From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 21112@debbugs.gnu.org, Raffaele Ricciardi <rfflrccrd@gmail.com>
Subject: bug#21112: 25; Patch: show minibuffer messages with a face
Date: Thu, 27 Jun 2019 00:28:06 +0300 [thread overview]
Message-ID: <87y31orqm1.fsf@mail.linkov.net> (raw)
In-Reply-To: <m3tvcdxuod.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 25 Jun 2019 22:43:30 +0200")
[-- Attachment #1: Type: text/plain, Size: 653 bytes --]
>>>> I think it might be a good idea to use a different face for these
>>>> temporary messages, but you can currently do this:
>>>>
>>>> (minibuffer-message (propertize "Foo" 'face 'bold))
>>>
>>> So I don't think this is something that we want; closing the bug report.
>>
>> For consistency with isearch messages that are highlighted with the
>> minibuffer-prompt face, minibuffer-message needs to do the same.
>
> [...]
>
>> + (setq message (apply #'propertize message minibuffer-message-properties))
>
> But this will overwrite the face properties the caller has set, right?
This patch checks for existing face properties to not overwrite them:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: minibuffer-message-properties.3.patch --]
[-- Type: text/x-diff, Size: 757 bytes --]
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 57702760fb..9a473b6867 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -714,6 +717,9 @@ minibuffer-message
(copy-sequence message)
(concat " [" message "]")))
(when args (setq message (apply #'format-message message args)))
+ ;; If not already propertized:
+ (unless (or (text-properties-at 0 message) (next-property-change 0 message))
+ (setq message (apply #'propertize message minibuffer-message-properties)))
(let ((ol (make-overlay (point-max) (point-max) nil t t))
;; A quit during sit-for normally only interrupts the sit-for,
;; but since minibuffer-message is used at the end of a command,
next prev parent reply other threads:[~2019-06-26 21:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 12:46 bug#21112: 25; Patch: show minibuffer messages with a face Raffaele Ricciardi
2015-07-22 13:42 ` Drew Adams
2015-07-22 13:44 ` Drew Adams
2015-07-22 15:27 ` Raffaele Ricciardi
2015-07-22 15:42 ` Drew Adams
2016-02-23 9:34 ` Lars Ingebrigtsen
2019-06-25 15:50 ` Lars Ingebrigtsen
2019-06-25 19:47 ` Juri Linkov
2019-06-25 20:43 ` Lars Ingebrigtsen
2019-06-26 21:28 ` Juri Linkov [this message]
2019-06-27 10:28 ` Lars Ingebrigtsen
2019-06-27 14:22 ` Drew Adams
2019-06-27 20:29 ` Juri Linkov
2019-06-27 21:19 ` Drew Adams
2019-06-27 20:28 ` Juri Linkov
2019-06-27 21:37 ` Drew Adams
2019-07-04 22:01 ` Juri Linkov
2019-06-25 20:54 ` Drew Adams
2019-06-26 21:30 ` Juri Linkov
2019-06-26 22:13 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y31orqm1.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=21112@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=rfflrccrd@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).