Function: follow-post-command-hook
follow-post-command-hook is a byte-compiled function defined in
follow.el.gz.
Signature
(follow-post-command-hook)
Documentation
Ensure that the windows in Follow mode are adjacent after each command.
Source Code
;; Defined in /usr/src/emacs/lisp/follow.el.gz
;;; Post Command Hook
;; The magic little box. This function was formerly called after every
;; command. It is now called before each redisplay operation (see
;; `follow-pre-redisplay-function' above), and at the end of several
;; search/replace commands. It retains its historical name.
;;
;; This is not as complicated as it seems. It is simply a list of common
;; display situations and the actions to take, plus commands for redrawing
;; the screen if it should be unaligned.
;;
;; We divide the check into two parts; whether we are at the end or not.
;; This is due to the fact that the end can actually be visible
;; in several window even though they are aligned.
(defun follow-post-command-hook ()
"Ensure that the windows in Follow mode are adjacent after each command."
(unless (input-pending-p)
(let ((follow-inside-post-command-hook-call t)
(win (selected-window)))
;; Work in the selected window, not in the current buffer.
(with-current-buffer (window-buffer win)
(unless (and (symbolp this-command)
(get this-command 'follow-mode-use-cache))
(setq follow-windows-start-end-cache nil))
(follow-adjust-window win)))))