summaryrefslogtreecommitdiff
path: root/lisp/follow.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2007-10-08 16:06:15 +0000
committerJuanma Barranquero <lekktu@gmail.com>2007-10-08 16:06:15 +0000
commit0a957b2f7720a1bd177b37c32e11b4dee8f807c0 (patch)
tree0c572938754cd852c025df0434e9f7d34c18424f /lisp/follow.el
parent3d0910ae255524a0b2eafb6ca881cb122bdebc03 (diff)
downloademacs-0a957b2f7720a1bd177b37c32e11b4dee8f807c0.tar.gz
(follow-mode): Don't run hooks twice. Use `when'.
Diffstat (limited to 'lisp/follow.el')
-rw-r--r--lisp/follow.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/follow.el b/lisp/follow.el
index 41ffdd123ee..7c3af098655 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -523,20 +523,18 @@ is called. When turned off, `follow-mode-off-hook' is called.
Keys specific to Follow mode:
\\{follow-mode-map}"
:keymap follow-mode-map
- (if (and follow-mode follow-intercept-processes)
- (follow-intercept-process-output))
+ (when (and follow-mode follow-intercept-processes)
+ (follow-intercept-process-output))
(cond (follow-mode ; On
;; XEmacs: If this is non-nil, the window will scroll before
;; the point will have a chance to get into the next window.
- (if (boundp 'scroll-on-clipped-lines)
- (setq scroll-on-clipped-lines nil))
+ (when (boundp 'scroll-on-clipped-lines)
+ (setq scroll-on-clipped-lines nil))
(force-mode-line-update)
- (add-hook 'post-command-hook 'follow-post-command-hook t)
- (run-hooks 'follow-mode-hook))
+ (add-hook 'post-command-hook 'follow-post-command-hook t))
((not follow-mode) ; Off
- (force-mode-line-update)
- (run-hooks 'follow-mode-off-hook))))
+ (force-mode-line-update))))
;;}}}
;;{{{ Find file hook