diff options
author | Simon Marshall <simon@gnu.org> | 1996-02-08 10:04:55 +0000 |
---|---|---|
committer | Simon Marshall <simon@gnu.org> | 1996-02-08 10:04:55 +0000 |
commit | fed42c78fec1e26a90bf9d128acd7b0a45df34eb (patch) | |
tree | 28a501e8716ee2057027503cedc1c5ad1151d94d /lisp/subr.el | |
parent | e18bc1cfe855c4d84ebede7ab361e2872ea4c165 (diff) | |
download | emacs-fed42c78fec1e26a90bf9d128acd7b0a45df34eb.tar.gz |
Added get-buffer-window-list.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 11d22bb8f8f..df91d84efc0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -697,6 +697,17 @@ This variable is meaningful on MS-DOG and Windows NT. On those systems, it is automatically local in every buffer. On other systems, this variable is normally always nil.") +;; This should probably be written in C (i.e., without using `walk-windows'). +(defun get-buffer-window-list (buffer &optional frame) + "Return windows currently displaying BUFFER, or nil if none. +See `get-buffer-window' for the meaning of FRAME." + (let (windows) + (walk-windows (function (lambda (window) + (if (eq (window-buffer window) buffer) + (setq windows (cons window windows))))) + nil frame) + windows)) + (defun ignore (&rest ignore) "Do nothing and return nil. This function accepts any number of arguments, but ignores them." |