; * lisp/subr.el (use-dialog-box-p): Fix last change.

This commit is contained in:
Eli Zaretskii 2023-04-02 11:42:43 +03:00
parent 3619663f98
commit 82d0b6c64e

View file

@ -3538,10 +3538,9 @@ confusing to some users.")
(defvar from--tty-menu-p nil (defvar from--tty-menu-p nil
"Non-nil means the current command was invoked from a TTY menu.") "Non-nil means the current command was invoked from a TTY menu.")
(defun use-dialog-box-p () (defun use-dialog-box-p ()
"Say whether the current command should prompt the user via a dialog box." "Return non-nil if the current command should prompt the user via a dialog box."
(and last-input-event ; not during startup (and last-input-event ; not during startup
(or (and last-nonmenu-event ; nil is listp... (or (consp last-nonmenu-event) ; invoked by a mouse event
(listp last-nonmenu-event)) ; invoked by a mouse event
from--tty-menu-p) ; invoked via TTY menu from--tty-menu-p) ; invoked via TTY menu
use-dialog-box)) use-dialog-box))