diff lisp/frame.el @ 83335:60208d3a0bb1

Handle and document that `delete-frame' may call functions in `delete-frame-functions' twice. * src/frame.c (syms_of_frame): Add warning to `delete-frame-functions' description. * lisp/frame.el (terminal-handle-delete-frame): Check that the frame is alive. * lisp/server.el (server-handle-delete-frame): Ditto. Remove bogus comment. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-375
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 06 Jul 2005 01:41:56 +0000
parents 40c0ee282254
children 9216636c02fc
line wrap: on
line diff
--- a/lisp/frame.el	Wed Jul 06 00:42:58 2005 +0000
+++ b/lisp/frame.el	Wed Jul 06 01:41:56 2005 +0000
@@ -1484,7 +1484,8 @@
   ;; XXX We assume that the display is closed immediately after the
   ;; last frame is deleted on it.  It would be better to create a hook
   ;; called `delete-display-functions', and use it instead.
-  (when (= 1 (length (frames-on-display-list (frame-display frame))))
+  (when (and (frame-live-p frame)
+	     (= 1 (length (frames-on-display-list (frame-display frame)))))
     (setq terminal-parameter-alist
 	  (assq-delete-all (frame-display frame) terminal-parameter-alist))))