[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dedicated frames
From: |
rgb |
Subject: |
Re: dedicated frames |
Date: |
10 Jan 2007 06:42:08 -0800 |
User-agent: |
G2/1.0 |
Kevin Rodgers wrote:
> 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))
You make it look easy.
Thanks.
Exactly what I needed.