diff options
| author | Kim F. Storm | 2003-09-24 22:55:42 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2003-09-24 22:55:42 +0000 |
| commit | 22f9c48c8299d370be8b504525f096a6ef321f46 (patch) | |
| tree | bf36515a1529c8577af179a6099029c1a2c7b096 | |
| parent | 56cfea72a3892bd7042e286b1784e56c404b2bb7 (diff) | |
| download | emacs-22f9c48c8299d370be8b504525f096a6ef321f46.tar.gz emacs-22f9c48c8299d370be8b504525f096a6ef321f46.zip | |
(window-current-scroll-bars): New defun.
| -rw-r--r-- | lisp/window.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/window.el b/lisp/window.el index 2cfc254b220..c4ae59e148f 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -75,6 +75,23 @@ If ALL-FRAMES is neither nil nor t, count only the selected frame." | |||
| 75 | (eq base-window | 75 | (eq base-window |
| 76 | (next-window base-window (if nomini 'arg) all-frames)))) | 76 | (next-window base-window (if nomini 'arg) all-frames)))) |
| 77 | 77 | ||
| 78 | (defun window-current-scroll-bars (&optional window) | ||
| 79 | "Return the current scroll-bar settings in window WINDOW. | ||
| 80 | Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the | ||
| 81 | current location of the vertical scroll-bars (left, right, or nil), | ||
| 82 | and HORISONTAL specifies the current location of the horisontal scroll | ||
| 83 | bars (top, bottom, or nil)." | ||
| 84 | (let ((vert (nth 2 (window-scroll-bars window))) | ||
| 85 | (hor nil)) | ||
| 86 | (when (or (eq vert t) (eq hor t)) | ||
| 87 | (let ((fcsb (frame-current-scroll-bars | ||
| 88 | (window-frame (or window (selected-window)))))) | ||
| 89 | (if (eq vert t) | ||
| 90 | (setq vert (car fcsb))) | ||
| 91 | (if (eq hor t) | ||
| 92 | (setq hor (cdr fcsb))))) | ||
| 93 | (cons vert hor))) | ||
| 94 | |||
| 78 | (defun walk-windows (proc &optional minibuf all-frames) | 95 | (defun walk-windows (proc &optional minibuf all-frames) |
| 79 | "Cycle through all visible windows, calling PROC for each one. | 96 | "Cycle through all visible windows, calling PROC for each one. |
| 80 | PROC is called with a window as argument. | 97 | PROC is called with a window as argument. |