Colin Rafferty <craffert(a)ms.com> writes:
(defun delete-frame-or-save-buffers-kill-emacs (&optional frame)
"If there is only one frame, `save-buffers-kill-emacs', else
`delete-frame'."
(interactive)
(delete-frame frame t))
(global-set-key [(control x) (5) (0)] 'delete-frame-or-save-buffers-kill-emacs)
(setq allow-deletion-of-last-visible-frame t)
Jan