1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

(handle-delete-frame): New function.

This commit is contained in:
Richard M. Stallman 1994-09-29 04:48:59 +00:00
parent a981e7fff1
commit 924be53af1

View File

@ -105,6 +105,21 @@ These supersede the values given in `default-frame-alist'.")
(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