Mercurial > emacs
changeset 9175:df2f1773aa06
(handle-delete-frame): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 29 Sep 1994 04:48:59 +0000 |
parents | 900fdf19446a |
children | 5646f9ac8ec3 |
files | lisp/frame.el |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/frame.el Wed Sep 28 22:38:04 1994 +0000 +++ b/lisp/frame.el Thu Sep 29 04:48:59 1994 +0000 @@ -105,6 +105,21 @@ (frame-selected-window frame)))))) (setq special-display-function 'special-display-popup-frame) + +;; Handle delete-frame events from the X server. +(defun handle-delete-frame (event) + (interactive "e") + (let ((frame (posn-window (event-start event))) + (i 0) + (tail (frame-list))) + (while tail + (and (frame-visible-p (car tail)) + (not (eq (car tail) frame)) + (setq i (1+ i))) + (setq tail (cdr tail))) + (if (> i 0) + (delete-frame frame t) + (kill-emacs)))) ;;;; Arrangement of frames at startup