[Top][All Lists]

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

Re: Use of minibuffer-prompt face when minibuffer is not involved

From: Stefan Monnier
Subject: Re: Use of minibuffer-prompt face when minibuffer is not involved
Date: Fri, 10 May 2019 16:52:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> 0. Do nothing. ("The face might be called minibuffer-prompt, but there
>    are enough non-minibuffer uses of it that it's not worth fixing
>    this inconsistency at this point.")

That's what I vote for.

More to the point, I think the difference between minibuffer prompts and
non-minibuffer prompts should be a purely internal one.  After all, you
could rewrite yes-or-no-p so as not to use a minibuffer or rewrite
y-or-n-p to make it use a minibuffer: should that have as a side-effect
to use a different face, really?

>     - dired-do-shell-command's warning about "wildcard" characters
>       annoys me, since AFAICT they may not be wildcards at all
>       (e.g. they may be quoted or backslash-escaped).
>     - Rather than coming up with a better warning, I toyed with text
>       properties to build a prompt which highlights these characters.
>     - I found out that y-or-n-p discards my prompt's text properties.

So the problem is not the use of minibuffer-prompt but the fact that it
overrides other faces while applying it.  That should be easy to fix by
using `add-face-text-property` instead of `propertize`.


reply via email to

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