Function: window-largest-empty-rectangle--disjoint-maximums
window-largest-empty-rectangle--disjoint-maximums is a byte-compiled
function defined in window.el.gz.
Signature
(window-largest-empty-rectangle--disjoint-maximums MAXIMUMS COUNT)
Documentation
Support function for window-largest-empty-rectangle.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window-largest-empty-rectangle--disjoint-maximums (maximums count)
"Support function for `window-largest-empty-rectangle'."
(setq maximums (sort maximums (lambda (x y) (> (car x) (car y)))))
(let ((new-length 0)
new-maximums)
(while (and maximums (< new-length count))
(let* ((maximum (car maximums))
(at (nth 2 maximum))
(to (nth 3 maximum)))
(catch 'drop
(dolist (new-maximum new-maximums)
(let ((new-at (nth 2 new-maximum))
(new-to (nth 3 new-maximum)))
(when (if (< at new-at) (> to new-at) (< at new-to))
;; Intersection -> drop.
(throw 'drop nil))))
(setq new-maximums (cons maximum new-maximums))
(setq new-length (1+ new-length)))
(setq maximums (cdr maximums))))
(nreverse new-maximums)))