mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
(follow-mode): Don't run hooks twice. Use `when'.
This commit is contained in:
parent
3d0910ae25
commit
0a957b2f77
@ -523,20 +523,18 @@ is called. When turned off, `follow-mode-off-hook' is called.
|
|||||||
Keys specific to Follow mode:
|
Keys specific to Follow mode:
|
||||||
\\{follow-mode-map}"
|
\\{follow-mode-map}"
|
||||||
:keymap follow-mode-map
|
:keymap follow-mode-map
|
||||||
(if (and follow-mode follow-intercept-processes)
|
(when (and follow-mode follow-intercept-processes)
|
||||||
(follow-intercept-process-output))
|
(follow-intercept-process-output))
|
||||||
(cond (follow-mode ; On
|
(cond (follow-mode ; On
|
||||||
;; XEmacs: If this is non-nil, the window will scroll before
|
;; XEmacs: If this is non-nil, the window will scroll before
|
||||||
;; the point will have a chance to get into the next window.
|
;; the point will have a chance to get into the next window.
|
||||||
(if (boundp 'scroll-on-clipped-lines)
|
(when (boundp 'scroll-on-clipped-lines)
|
||||||
(setq scroll-on-clipped-lines nil))
|
(setq scroll-on-clipped-lines nil))
|
||||||
(force-mode-line-update)
|
(force-mode-line-update)
|
||||||
(add-hook 'post-command-hook 'follow-post-command-hook t)
|
(add-hook 'post-command-hook 'follow-post-command-hook t))
|
||||||
(run-hooks 'follow-mode-hook))
|
|
||||||
|
|
||||||
((not follow-mode) ; Off
|
((not follow-mode) ; Off
|
||||||
(force-mode-line-update)
|
(force-mode-line-update))))
|
||||||
(run-hooks 'follow-mode-off-hook))))
|
|
||||||
|
|
||||||
;;}}}
|
;;}}}
|
||||||
;;{{{ Find file hook
|
;;{{{ Find file hook
|
||||||
|
Loading…
Reference in New Issue
Block a user