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

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

bug#35564: 27.0.50; [PATCH] Tweak dired-do-shell-command warning about "


From: martin rudalics
Subject: bug#35564: 27.0.50; [PATCH] Tweak dired-do-shell-command warning about "wildcard" characters
Date: Sun, 5 May 2019 10:44:21 +0200

> … and ended up with the attached patch, which I am not entirely
> satisfied with (for one, it replaces `y-or-n-p' with `yes-or-no-p'
> merely because the former seems to strip my prompt's text attributes
> somehow[1]).

[...]

> [1] Compare:
>
> (let ((prompt "foobar "))
>    (add-face-text-property 3 6 'warning nil prompt)
>    (yes-or-no-p prompt))
>
> With:
>
> (let ((prompt "foobar "))
>    (add-face-text-property 3 6 'warning nil prompt)
>    (y-or-n-p prompt))

'y-or-n-p' propertizes the prompt rigidly as

                    (read-key (propertize (if (memq answer scroll-actions)
                                              prompt
                                            (concat "Please answer y or n.  "
                                                    prompt))
                                          'face 'minibuffer-prompt)))))

while 'yes-or-no-p' carefully applies 'minibuffer-prompt-properties'
to any text properties provided with PROMPT.

martin






reply via email to

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