/[emacs]/emacs/lisp/scroll-all.el
ViewVC logotype

Diff of /emacs/lisp/scroll-all.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by gm, Sun Apr 21 14:43:31 2002 UTC revision 1.7 by gm, Sun Apr 21 16:30:28 2002 UTC
# Line 63  use either M-x customize or the function Line 63  use either M-x customize or the function
63    "Scroll down all visible windows."    "Scroll down all visible windows."
64    (interactive "P")    (interactive "P")
65    (let ((num-windows (count-windows))    (let ((num-windows (count-windows))
66          (count 1))                  (count 1))
67      (if (> num-windows 1)      (when (> num-windows 1)
68          (progn (other-window 1)            (other-window 1)
69                  (while (< count num-windows)            (while (< count num-windows)
70                    (if (not (eq (point) (point-max)))                  (if (not (eq (point) (point-max)))
71                        (progn (call-interactively 'next-line)))                          (call-interactively 'next-line))
72                    (other-window 1)                  (other-window 1)
73                    (setq count (1+ count)))))))                  (setq count (1+ count))))))
74    
75  (defun scroll-all-scroll-up-all (arg)  (defun scroll-all-scroll-up-all (arg)
76    "Scroll up all visible windows."    "Scroll up all visible windows."
77    (interactive "P")    (interactive "P")
78    (let ((num-windows (count-windows))    (let ((num-windows (count-windows))
79          (count 1))                  (count 1))
80      (if (> num-windows 1)      (when (> num-windows 1)
81          (progn (other-window 1)            (other-window 1)
82                  (while (< count num-windows)            (while (< count num-windows)
83                    (if (not (eq (point) (point-min)))                  (if (not (eq (point) (point-min)))
84                        (progn (call-interactively 'previous-line)))                          (call-interactively 'previous-line))
85                    (other-window 1)                  (other-window 1)
86                    (setq count (1+ count)))))))                  (setq count (1+ count))))))
87    
88  (defun scroll-all-page-down-all (arg)  (defun scroll-all-page-down-all (arg)
89    "Page down in all visible windows."    "Page down in all visible windows."
90    (interactive "P")    (interactive "P")
91    (let ((num-windows (count-windows))    (let ((num-windows (count-windows))
92          (count 1))                  (count 1))
93      (if (> num-windows 1)      (when (> num-windows 1)
94          (progn (other-window 1)            (other-window 1)
95                 (while (< count num-windows)            (while (< count num-windows)
96                   (call-interactively 'scroll-up)                  (condition-case nil
97                   (other-window 1)                          (call-interactively 'scroll-up) (end-of-buffer nil))
98                   (setq count (1+ count)))))))                  (other-window 1)
99                    (setq count (1+ count))))))
100    
101  (defun scroll-all-page-up-all (arg)  (defun scroll-all-page-up-all (arg)
102    "Page up in all visible windows."    "Page up in all visible windows."
103    (interactive "P")    (interactive "P")
104    (let ((num-windows (count-windows))    (let ((num-windows (count-windows))
105          (count 1))                  (count 1))
106      (if (> num-windows 1)      (when (> num-windows 1)
107          (progn (other-window 1)            (other-window 1)
108                 (while (< count num-windows)            (while (< count num-windows)
109                   (call-interactively 'scroll-down)                  (condition-case nil
110                   (other-window 1)                          (call-interactively 'scroll-down) (beginning-of-buffer nil))
111                   (setq count (1+ count)))))))                  (other-window 1)
112                    (setq count (1+ count))))))
113    
114    (defun scroll-all-beginning-of-buffer-all (arg)
115      "Go to the beginning of the buffer in all visible windows."
116      (interactive "P")
117      (let ((num-windows (count-windows))
118                    (count 1))
119        (when (> num-windows 1)
120              (other-window 1)
121              (while (< count num-windows)
122                    (beginning-of-buffer)
123                    (other-window 1)
124                    (setq count (1+ count))))))
125    
126    (defun scroll-all-end-of-buffer-all (arg)
127      "Go to the end of the buffer in all visible windows."
128      (interactive "P")
129      (let ((num-windows (count-windows))
130                    (count 1))
131        (when (> num-windows 1)
132              (other-window 1)
133              (while (< count num-windows)
134                    (end-of-buffer)
135                    (other-window 1)
136                    (setq count (1+ count))))))
137    
138    
139  (defun scroll-all-check-to-scroll ()  (defun scroll-all-check-to-scroll ()
# Line 120  use either M-x customize or the function Line 146  use either M-x customize or the function
146     ((eq this-command 'scroll-up)     ((eq this-command 'scroll-up)
147          (call-interactively 'scroll-all-page-down-all))          (call-interactively 'scroll-all-page-down-all))
148     ((eq this-command 'scroll-down)     ((eq this-command 'scroll-down)
149          (call-interactively 'scroll-all-page-up-all))))          (call-interactively 'scroll-all-page-up-all))
150       ((eq this-command 'beginning-of-buffer)
151            (call-interactively 'scroll-all-beginning-of-buffer-all))
152       ((eq this-command 'end-of-buffer)
153            (call-interactively 'scroll-all-end-of-buffer-all))))
154    
155    
156  ;;;###autoload  ;;;###autoload
157  (defun scroll-all-mode (arg)  (defun scroll-all-mode (arg)

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26