(defun foo () (y-or-n-p "foo? ")) (defun bar () (y-or-n-p "bar? ")) (setq kill-emacs-query-functions '(foo bar))
2. Use the menu-bar File > Exit Emacs. The question "foo? " correctly appears in a popup menu y/n. 3. Respond `n' to "foo? ". 4. The question "bar? " should be asked via a popup menu also, but it appears instead in the minibuffer. This is controlled by last-nonmenu-event. At C level, it is last_nonmenu_event. Can you determine where and how it gets altered when foo asks its question? Sorry, I don't have much time to debug this. I did run through the debugger (debug-on-entry foo), checking last-nonmenu-event at each step. The value remained `(menu-bar)' throughout, right up through debugger-reenable in run-hooks(post-command-hook). However, after run-hooks(post-command-hook), the value was nil, so it was nil when run-hooks(activate-menubar-hook) was run. _______________________________________________ Emacs-pretest-bug mailing list Emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug