[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dedicated frames
From: |
Kevin Rodgers |
Subject: |
Re: dedicated frames |
Date: |
Tue, 09 Jan 2007 07:40:21 -0700 |
User-agent: |
Thunderbird 1.5.0.9 (Macintosh/20061207) |
rgb wrote:
Has someone written a version of next-buffer that doesn't
display buffers that are already displayed in dedicated frames?
It appears to me to be terribly difficult to tell if a given buffer
happens to be associated with a dedicated window or frame.
How about:
(defun get-buffer-dedicated-window (buffer &optional all-frames)
"Return a dedicated window displaying BUFFER, or nil if none.
BUFFER can be a buffer or a buffer name.
ALL-FRAMES determines which frames are considered; see `walk-windows'."
(catch 'window
(mapc (lambda (window)
(when (or (window-dedicated-p window)
(frame-parameter (window-frame window) 'unsplittable))
(throw 'window window)))
(get-buffer-window-list buffer nil all-frames))
nil))
I'm not sure how to plug that in to next-buffer -- maybe like this:
(add-to-list 'default-frame-alist
'(buffer-predicate . (lambda (buffer)
(null
(get-buffer-dedicated-window buffer)))))
--
Kevin Rodgers
Denver, Colorado, USA
- dedicated frames, rgb, 2007/01/03
- Re: dedicated frames,
Kevin Rodgers <=
- Message not available