+2002-07-29 John Paul Wallington <jpw@shootybangbang.com>
+
+ * scroll-all.el (scroll-all-mode): Handle numeric arg. Use `if'
+ instead of `cond'.
+
2002-07-29 Kenichi Handa <handa@etl.go.jp>
* international/mule.el (ctext-post-read-conversion): Add support
(defun scroll-all-mode (arg)
"Toggle Scroll-All minor mode."
(interactive "P")
- (setq scroll-all-mode (not scroll-all-mode))
- (cond
- ((eq scroll-all-mode 't)
- (add-hook 'post-command-hook 'scroll-all-check-to-scroll))
- ((eq scroll-all-mode 'nil)
- (remove-hook 'post-command-hook 'scroll-all-check-to-scroll))))
+ (setq scroll-all-mode
+ (if (null arg) (not scroll-all-mode)
+ (> (prefix-numeric-value arg) 0)))
+ (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)