* frameset.el (frameset-p, frameset-save): Fix autoload cookies.
(frameset-filter-minibuffer): Doc fix.
(frameset-restore): Fix autoload cookie. Fix typo in docstring.
+ (frameset--set-id, frameset--process-minibuffer-frames)
+ (frameset-restore): Rename parameter `frameset-id' to `frame-id'.
+ (frameset--reuse-frame): Pass correct frame-id to frameset--find-frame.
* desktop.el (desktop-clear): Only delete frames when called
interactively and desktop-restore-frames is non-nil. Doc fix.
;; Saving framesets
(defun frameset--set-id (frame)
- "Set FRAME's `frameset-id' if not yet set.
+ "Set FRAME's `frame-id' if not yet set.
Internal use only."
- (unless (frame-parameter frame 'frameset-id)
+ (unless (frame-parameter frame 'frame-id)
(set-frame-parameter frame
- 'frameset-id
+ 'frame-id
(mapconcat (lambda (n) (format "%04X" n))
(cl-loop repeat 4 collect (random 65536))
"-"))))
(unless (frame-parameter frame 'frameset--mini)
(frameset--set-id frame)
(let* ((mb-frame (window-frame (minibuffer-window frame)))
- (id (and mb-frame (frame-parameter mb-frame 'frameset-id))))
+ (id (and mb-frame (frame-parameter mb-frame 'frame-id))))
(if (null id)
(error "Minibuffer frame %S for %S is excluded" mb-frame frame)
;; For minibufferless frames, frameset--mini is a cons
- ;; (nil . FRAME-ID), where FRAME-ID is the frameset-id of
+ ;; (nil . FRAME-ID), where FRAME-ID is the frame-id of
;; the frame containing its minibuffer window.
(set-frame-parameter frame
'frameset--mini
;; M-x desktop-read).
(setq frame (frameset--find-frame
(lambda (f id)
- (string= (frame-parameter f 'frameset-id) id))
- display (cdr mini)))
+ (string= (frame-parameter f 'frame-id) id))
+ display (cdr (assq 'frame-id frame-cfg))))
;; If it has not been loaded, and it is not a minibuffer-only frame,
;; let's look for an existing non-minibuffer-only frame to reuse.
(unless (or frame (eq (cdr (assq 'minibuffer frame-cfg)) 'only))
;; For minibufferless frames, check whether they already exist,
;; and that they are linked to the right minibuffer frame.
(setq frame (frameset--find-frame
- (lambda (f id mini-id)
- (and (string= (frame-parameter f 'frameset-id) id)
- (string= (frame-parameter (window-frame (minibuffer-window f))
- 'frameset-id)
- mini-id)))
- display (cdr (assq 'frameset-id frame-cfg)) (cdr mini))))
+ (lambda (f id mini-id)
+ (and (string= (frame-parameter f 'frame-id) id)
+ (string= (frame-parameter (window-frame (minibuffer-window f))
+ 'frame-id)
+ mini-id)))
+ display (cdr (assq 'frame-id frame-cfg)) (cdr mini))))
(t
;; Default to just finding a frame in the same display.
(setq frame (frameset--find-frame nil display))))
(t ;; Frame depends on other frame's minibuffer window.
(let* ((mb-frame (or (cl-find-if
(lambda (f)
- (string= (frame-parameter f 'frameset-id)
+ (string= (frame-parameter f 'frame-id)
mb-id))
(frame-list))
(error "Minibuffer frame %S not found" mb-id)))