- "Check `last-command' to see if a scroll was done."
- (if (eq this-command 'next-line)
- (call-interactively 'scroll-all-scroll-down-all))
- (if (eq this-command 'previous-line)
- (call-interactively 'scroll-all-scroll-up-all))
- (if (eq this-command 'fkey-scroll-up)
- (call-interactively 'scroll-all-page-down-all))
- (if (eq this-command 'fkey-scroll-down)
- (call-interactively 'scroll-all-page-up-all)))
+ "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))))
+