Function: undelete-frame--save-deleted-frame
undelete-frame--save-deleted-frame is a byte-compiled function defined
in frame.el.gz.
Signature
(undelete-frame--save-deleted-frame FRAME)
Documentation
Save the configuration of frames deleted with delete-frame.
Only the 16 most recently deleted frames are saved.
Source Code
;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun undelete-frame--save-deleted-frame (frame)
"Save the configuration of frames deleted with `delete-frame'.
Only the 16 most recently deleted frames are saved."
(when (and after-init-time (frame-live-p frame))
(setq undelete-frame--deleted-frames
(cons
(list
(display-graphic-p)
(seq-remove
(lambda (elem)
(or (memq (car elem) frame-internal-parameters)
;; When the daemon is started from a graphical
;; environment, TTY frames have a 'display' parameter set
;; to the value of $DISPLAY (see the note in
;; `server--on-display-p'). Do not store that parameter
;; in the frame data, otherwise `undelete-frame' attempts
;; to restore a graphical frame.
(and (eq (car elem) 'display) (not (display-graphic-p)))))
(frame-parameters frame))
(window-state-get (frame-root-window frame)))
undelete-frame--deleted-frames))
(if (> (length undelete-frame--deleted-frames) 16)
(setq undelete-frame--deleted-frames
(butlast undelete-frame--deleted-frames)))))