[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69460: 29.2.50; dialog confirmation box not working
From: |
Eli Zaretskii |
Subject: |
bug#69460: 29.2.50; dialog confirmation box not working |
Date: |
Wed, 28 Feb 2024 17:58:09 +0200 |
> From: Jeff Filipovits <jeff@civil-rights.law>
> Date: Wed, 28 Feb 2024 10:19:24 -0500
>
> Previously (Emacs 28),
>
> (let ((last-nonmenu-event nil))
> (yes-or-no-p "whatever"))
>
> Would pop up a system dialog box. This does not work
> anymore.
Yes, because popping up a GUI dialog just because last-nonmenu-event
was nil caused trouble in some important cases, especially immediately
after starting Emacs. The conditions for triggering GUI dialogs are
now more elaborate:
(defun use-dialog-box-p ()
"Return non-nil if the current command should prompt the user via a dialog
box."
(and last-input-event ; not during startup
(or (consp last-nonmenu-event) ; invoked by a mouse event
(and (null last-nonmenu-event)
(consp last-input-event))
from--tty-menu-p) ; invoked via TTY menu
use-dialog-box))
This is not a bug.