Skip to content

Instantly share code, notes, and snippets.

@bowbow99
Created September 29, 2010 11:12
Show Gist options
  • Save bowbow99/602564 to your computer and use it in GitHub Desktop.
Save bowbow99/602564 to your computer and use it in GitHub Desktop.
一番左下の window を探す #xyzzy
(in-package :editor)
(defun find-most-left/bottom-window (&optional (start (selected-window)))
(if (= (count-windows) 1)
(selected-window)
(do* ((win (next-window start) (next-window win))
(coord (window-coordinate win) (window-coordinate win))
(most (cons start (window-coordinate start))))
((eql win start)
(car most))
(when (and (zerop (first coord))
(or (not (zerop (first (cdr most))))
(> (second coord) (second (cdr most)))))
(setq most (cons win coord))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment