emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/window.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/window.el
Date: Sat, 22 Oct 2005 11:35:06 -0400

Index: emacs/lisp/window.el
diff -c emacs/lisp/window.el:1.108 emacs/lisp/window.el:1.109
*** emacs/lisp/window.el:1.108  Sat Aug  6 22:13:43 2005
--- emacs/lisp/window.el        Sat Oct 22 15:35:06 2005
***************
*** 192,197 ****
--- 192,209 ----
  
  (defalias 'some-window 'get-window-with-predicate)
  
+ ;; This should probably be written in C (i.e., without using `walk-windows').
+ (defun get-buffer-window-list (buffer &optional minibuf frame)
+   "Return list of all windows displaying BUFFER, or nil if none.
+ BUFFER can be a buffer or a buffer name.
+ See `walk-windows' for the meaning of MINIBUF and FRAME."
+   (let ((buffer (if (bufferp buffer) buffer (get-buffer buffer))) windows)
+     (walk-windows (function (lambda (window)
+                             (if (eq (window-buffer window) buffer)
+                                 (setq windows (cons window windows)))))
+                 minibuf frame)
+     windows))
+ 
  (defun minibuffer-window-active-p (window)
    "Return t if WINDOW (a minibuffer window) is now active."
    (eq window (active-minibuffer-window)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]