comparison lisp/frame.el @ 9175:df2f1773aa06

(handle-delete-frame): New function.
author Richard M. Stallman <rms@gnu.org>
date Thu, 29 Sep 1994 04:48:59 +0000
parents c6572fa27df3
children 1048e2d032e6
comparison
equal deleted inserted replaced
9174:900fdf19446a 9175:df2f1773aa06
103 (set-window-buffer (frame-selected-window frame) buffer) 103 (set-window-buffer (frame-selected-window frame) buffer)
104 (set-window-dedicated-p (frame-selected-window frame) t) 104 (set-window-dedicated-p (frame-selected-window frame) t)
105 (frame-selected-window frame)))))) 105 (frame-selected-window frame))))))
106 106
107 (setq special-display-function 'special-display-popup-frame) 107 (setq special-display-function 'special-display-popup-frame)
108
109 ;; Handle delete-frame events from the X server.
110 (defun handle-delete-frame (event)
111 (interactive "e")
112 (let ((frame (posn-window (event-start event)))
113 (i 0)
114 (tail (frame-list)))
115 (while tail
116 (and (frame-visible-p (car tail))
117 (not (eq (car tail) frame))
118 (setq i (1+ i)))
119 (setq tail (cdr tail)))
120 (if (> i 0)
121 (delete-frame frame t)
122 (kill-emacs))))
108 123
109 ;;;; Arrangement of frames at startup 124 ;;;; Arrangement of frames at startup
110 125
111 ;;; 1) Load the window system startup file from the lisp library and read the 126 ;;; 1) Load the window system startup file from the lisp library and read the
112 ;;; high-priority arguments (-q and the like). The window system startup 127 ;;; high-priority arguments (-q and the like). The window system startup