On a freshly checked out 21.2.35
Use "File -> Exit XEmacs" to exit XEmacs with some buffer unsaved
Select "Display Buffer" in the popup dialog
Press q to leave the displayed buffer
i get:
Signaling: (wrong-type-argument framep nil)
select-frame(nil)
get-dialog-box-response(#<keypress-event q> ("Save file /home/gb/Mail/INBOX?
" ("%_Yes" . act) ("%_No" . skip) ("Yes %_All" .
automatic) ("No A%_ll" . exit) ("%_Cancel" . quit) ("%_Display
Buffer" . [#<compiled-function ... "...(11)" ... 2>])))
map-y-or-n-p(#<compiled-function (buffer) "...(84)" [buffer-modified-p
buffer buffer-base-buffer symbol-value-in-buffer save-buffers-skip buffer-file-name
exiting buffer-offer-save buffer-size 0 arg t switch-buffer one-window-p
delete-other-windows switched switch-to-buffer format "Save file %s? "
"Save buffer %s? " buffer-name] 4> #<compiled-function (buffer)
"...(8)" [buffer nil (save-buffer) (...)] 3> (#<buffer
"*scratch*"> #<buffer "INBOX"> #<buffer "
*Minibuf-0*"> #<buffer " *Echo Area*"> #<buffer " *pixmap
conversion*"> #<buffer " *Message-Log*"> #<buffer
"*Group*"> #<buffer " *Gutter Area*"> #<buffer "
*vm-nonexistent-summary*"> #<buffer "INBOX Summary"> #<buffer
"*BBDB*"> #<buffer ".bbdb"> #<buffer " *canonical
address*"> #<buffer " *extract address components*"> #<buffer
" *split*"> #<buffer " *substitute*">) ("buffer"
"buffers" "save") ((?\^R #<compiled-function ...
"...(11)" ... 2> "%_Display Buffer")))
save-some-buffers-1(nil t t)
save-some-buffers(nil t)
save-buffers-kill-emacs(nil)
call-interactively(save-buffers-kill-emacs)