+(defun scroll-all-end-of-buffer-all (arg)
+ "Go to the end of the buffer in all visible windows."
+ (interactive "P")
+ (scroll-all-function-all 'end-of-buffer arg))
+
+
+(defun scroll-all-check-to-scroll ()
+ "Check `this-command' to see if a scroll is to be done."
+ (cond ((eq this-command 'next-line)
+ (call-interactively 'scroll-all-scroll-down-all))
+ ((eq this-command 'previous-line)
+ (call-interactively 'scroll-all-scroll-up-all))
+ ((eq this-command 'scroll-up)
+ (call-interactively 'scroll-all-page-down-all))
+ ((eq this-command 'scroll-down)
+ (call-interactively 'scroll-all-page-up-all))
+ ((eq this-command 'beginning-of-buffer)
+ (call-interactively 'scroll-all-beginning-of-buffer-all))
+ ((eq this-command 'end-of-buffer)
+ (call-interactively 'scroll-all-end-of-buffer-all))))
+
+
+;;;###autoload
+(define-minor-mode scroll-all-mode
+ "Toggle Scroll-All minor mode.
+With ARG, turn Scroll-All minor mode on if ARG is positive, off otherwise.
+When Scroll-All mode is on, scrolling commands entered in one window
+apply to all visible windows in the same frame."
+ nil " *SL*" nil
+ :global t
+ :group 'windows
+ :group 'scrolling
+ (if scroll-all-mode
+ (add-hook 'post-command-hook 'scroll-all-check-to-scroll)
+ (remove-hook 'post-command-hook 'scroll-all-check-to-scroll)))
+
+(provide 'scroll-all)
+
+;;; arch-tag: db20089a-b157-45df-b5d4-2430e60acdd8
+;;; scroll-all.el ends here