From ee3c2877bf62577130d2d91731cceaced9cdad98 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 8 Oct 2007 16:13:18 +0000 Subject: [PATCH] (follow-mode): Don't run hooks twice. Use `when'. --- lisp/ChangeLog | 4 ++++ lisp/follow.el | 14 ++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b98dac1e432..b8dab0b4989 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-10-08 Juanma Barranquero + + * follow.el (follow-mode): Don't run hooks twice. Use `when'. + 2007-10-07 Glenn Morris * simple.el (bad-packages-alist): Clarify Semantic and CEDET diff --git a/lisp/follow.el b/lisp/follow.el index e28edae846e..eddb1037a43 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -602,20 +602,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 -- 2.39.2