When a modified buffer is killed through some mouse action, I get a
``yes-or-no-p'' question in form of a single submenu drawn on the
screen, in the middle of the frame.
When I then click somewhere else in the frame (outside the menu), the
adopted semantics are "no" rather than "quit". yes-or-no-p returns
nil just as if "no" had been selected.
Verify this with the following code:
(setq last-nonmenu-event nil)
(yes-or-no-p "Save this buffer to file before closing window? ")
The expected behavior would be that a "quit" is carried out.
Otherwise, users can lose changes to a file just because they did not
hit the right "yes", or more likely, because they think they can
cancel the operation by just clicking somewhere else. Cancelling the
operation is exactly what standard GUIs do in such a situation, and
it's a good behavior.
In GNU Emacs 22.214.171.124 (powerpc-apple-darwin8.1.0)
of 2005-06-01 on madonna - Aquamacs Distribution 0.9.2 beta-5
Distributor `Apple Computers' version (10 4 1) .
configured using `configure '--without-x' '--prefix=/usr/local''