diff options
author | Pierre Courtieu <Pierre.Courtieu@cnam.fr> | 2015-09-25 17:03:43 +0200 |
---|---|---|
committer | Pierre Courtieu <Pierre.Courtieu@cnam.fr> | 2015-10-09 11:54:26 +0200 |
commit | 6effc3a06b96a791805d69c7dd82ef59349abf26 (patch) | |
tree | 7701514f4a18100c08761d297af6fb0cffc241cf /generic/pg-assoc.el | |
parent | be17a8f84cea29b8c9804af16b545ff9cfcf9dc6 (diff) |
Trying to not delete frames too eagerly when laying out.
Diffstat (limited to 'generic/pg-assoc.el')
-rw-r--r-- | generic/pg-assoc.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/generic/pg-assoc.el b/generic/pg-assoc.el index 7bb6146d..7b983bbf 100644 --- a/generic/pg-assoc.el +++ b/generic/pg-assoc.el @@ -52,5 +52,22 @@ Dead or nil buffers are not represented in the list." (setq bufs (cdr bufs))) wins)) + +(defun proof-associated-buffer-p (b) (member b (proof-associated-buffers))) + + +(defun proof-filter-associated-windows (lw) + "Remove windows of LW not displaying at least one associated buffer." + (remove-if-not (lambda (w) (proof-associated-buffer-p (window-buffer w))) lw)) + +(defun proof-find-all-associated-windows () + "Return the list of windows displaying an associated buffer." + (proof-filter-associated-windows (window-list-1 nil nil t))) + +(defun proof-find-all-associated-frames () + "Return the list of frames displaying at least one associated buffer." + (remove-if-not (lambda (f) (proof-filter-associated-windows (window-list f))) + (frame-list))) + (provide 'pg-assoc) ;;; pg-assoc.el ends here |