diff options
author | Pierre Courtieu <Pierre.Courtieu@cnam.fr> | 2015-11-13 16:37:28 +0100 |
---|---|---|
committer | Pierre Courtieu <Pierre.Courtieu@cnam.fr> | 2015-11-13 16:37:28 +0100 |
commit | 95c86b944368015804f0bfd0002dc098578bda58 (patch) | |
tree | 25c400e092b9cfda6c508839987e72296691267d /generic/pg-assoc.el | |
parent | 6c47d20a9e1fa0a30be041dc565ae71090ffcd4a (diff) |
Experimenting less brutal frame deletion.
Only in coq mode for now. There are still some strange frame deletion
some times.
Diffstat (limited to 'generic/pg-assoc.el')
-rw-r--r-- | generic/pg-assoc.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/pg-assoc.el b/generic/pg-assoc.el index 7b983bbf..6a27cd29 100644 --- a/generic/pg-assoc.el +++ b/generic/pg-assoc.el @@ -40,15 +40,17 @@ Some may be dead/nil." ;;;###autoload -(defun proof-associated-windows () +(defun proof-associated-windows (&optional all-frames) "Return a list of the associated buffers windows. -Dead or nil buffers are not represented in the list." +Dead or nil buffers are not represented in the list. Optional +argument ALL-FRAMES has the same meaning than for +`get-buffer-window'." (let ((bufs (proof-associated-buffers)) buf wins) (while bufs (setq buf (car bufs)) - (if (and buf (get-buffer-window buf)) - (setq wins (cons (get-buffer-window buf) wins))) + (if (and buf (get-buffer-window-list buf nil all-frames)) + (setq wins (append (get-buffer-window-list buf nil all-frames) wins))) (setq bufs (cdr bufs))) wins)) @@ -60,11 +62,9 @@ Dead or nil buffers are not represented in the list." "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 () +;;;###autoload +(defun proof-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))) |