[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 2b55a48d3e: * src/w32menu.c (simple_dialog_show): Use MB_YESNOC
From: |
Eli Zaretskii |
Subject: |
emacs-29 2b55a48d3e: * src/w32menu.c (simple_dialog_show): Use MB_YESNOCANCEL style. |
Date: |
Tue, 27 Dec 2022 13:55:38 -0500 (EST) |
branch: emacs-29
commit 2b55a48d3e3ccc9f5b1f8b6191d63360686d94d9
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
* src/w32menu.c (simple_dialog_show): Use MB_YESNOCANCEL style.
---
src/w32menu.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/w32menu.c b/src/w32menu.c
index b10239d5cc..c6d1efaf25 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -1073,7 +1073,10 @@ is_simple_dialog (Lisp_Object contents)
if (NILP (Fstring_equal (name, other)))
return false;
- /* Check there are no more options. */
+ /* Check there are no more options.
+
+ (FIXME: Since we use MB_YESNOCANCEL, we could also consider
+ dialogs with 3 options: Yes/No/Cancel as "simple". */
options = XCDR (options);
return !(CONSP (options));
}
@@ -1085,7 +1088,10 @@ simple_dialog_show (struct frame *f, Lisp_Object
contents, Lisp_Object header)
UINT type;
Lisp_Object lispy_answer = Qnil, temp = XCAR (contents);
- type = MB_YESNO;
+ /* We use MB_YESNOCANCEL to allow the user the equivalent of C-g
+ when the Yes/No question is asked vya y-or-n-p or
+ yes-or-no-p. */
+ type = MB_YESNOCANCEL;
/* Since we only handle Yes/No dialogs, and we already checked
is_simple_dialog, we don't need to worry about checking contents
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 2b55a48d3e: * src/w32menu.c (simple_dialog_show): Use MB_YESNOCANCEL style.,
Eli Zaretskii <=