Commit 721035d6 authored by Juri Linkov's avatar Juri Linkov
Browse files

* lisp/frameset.el (frameset--minibufferless-last-p): Add comments (bug#36894)

parent 495b33bb
Pipeline #2801 passed with stage
in 52 minutes and 1 second
......@@ -1104,9 +1104,18 @@ It sorts minibuffer-owning frames before minibufferless ones.
Internal use only."
(pcase-let ((`(,hasmini1 . ,id-def1) (cdr (assq 'frameset--mini (car state1))))
(`(,hasmini2 . ,id-def2) (cdr (assq 'frameset--mini (car state2)))))
(cond ((eq id-def1 t) t)
;; hasmini1 is t when 1st frame has its own minibuffer
;; hasmini2 is t when 2nd frame has its own minibuffer
;; id-def1 is t when 1st minibuffer-owning frame is the default-minibuffer-frame
;; or frame-id of 1st frame if it's minibufferless
;; id-def2 is t when 2nd minibuffer-owning frame is the default-minibuffer-frame
;; or frame-id of 2nd frame if it's minibufferless
(cond ;; Sort the minibuffer-owning default-minibuffer-frame first
((eq id-def1 t) t)
((eq id-def2 t) nil)
((not (eq hasmini1 hasmini2)) (eq hasmini1 t))
;; Sort non-default minibuffer-owning frames before minibufferless
((not (eq hasmini1 hasmini2)) (eq hasmini1 t)) ;; boolean xor
;; Sort minibufferless frames with frame-id before some remaining
((eq hasmini1 nil) (or id-def1 id-def2))
(t t))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment