diff options
author | Alan Mackenzie <acm@muc.de> | 2015-12-07 15:12:15 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2015-12-07 15:12:15 +0000 |
commit | 3194f1ccd99cfd13ddaf621d6e7f1e1aa1645165 (patch) | |
tree | 3963195a29eea661a697516ad424567a05cfdfeb /lisp/follow.el | |
parent | f5c403d269f4f5079dc47853f16a51e9542ea238 (diff) | |
download | emacs-3194f1ccd99cfd13ddaf621d6e7f1e1aa1645165.tar.gz |
Further progress making Isearch, Ispell, Replace work with Follow Mode.
* lisp/follow.el: (follow-mode): Remove references to sit*-for-function, which
no longer exists. Add follow-post-command-hook to three special purpose
hooks at setup, and remove them at tear down.
* lisp/isearch.el: (isearch-update): invoke isearch-update-post-hook before
isearch-lazy-highlight-new-loop.
(isearch-lazy-highlight-new-loop): Restore this function to what it previously
was, merging the functionality of isearch-lazy-highlight-maybe-new-loop into
it.
(isearch-lazy-highlight-maybe-new-loop): function removed.
* lisp/replace.el: (replace-update-post-hook): New hook variable.
(perform-replace): Add second (nil) argument to looking-back. Invoke
replace-update-post-hook before calling replace-highlight.
* lisp/textmodes/ispell.el: (ispell-update-post-hook): New hook variable.
(ispell-command-loop): invoke ispell-update-post-hook. Add GROUP argument to
call of pos-visible-in-window-p.
(ispell-display-buffer): Place *Choices* window at the top of the last window
in a window group.
Diffstat (limited to 'lisp/follow.el')
-rw-r--r-- | lisp/follow.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/follow.el b/lisp/follow.el index 2cbf0f2b93d..609b29f7ccd 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -423,6 +423,9 @@ Keys specific to Follow mode: (add-hook 'post-command-hook 'follow-post-command-hook t) (add-hook 'window-size-change-functions 'follow-window-size-change t) (add-hook 'after-change-functions 'follow-after-change nil t) + (add-hook 'isearch-update-post-hook 'follow-post-command-hook nil t) + (add-hook 'replace-update-post-hook 'follow-post-command-hook nil t) + (add-hook 'ispell-update-post-hook 'follow-post-command-hook nil t) (setq window-start-group-function 'follow-window-start) (setq window-end-group-function 'follow-window-end) @@ -431,8 +434,7 @@ Keys specific to Follow mode: (setq pos-visible-in-window-p-group-function 'follow-pos-visible-in-window-p) (setq selected-window-group-function 'follow-all-followers) - (setq move-to-window-line-group-function 'follow-move-to-window-line) - (setq sit*-for-function 'follow-sit-for)) + (setq move-to-window-line-group-function 'follow-move-to-window-line)) ;; Remove globally-installed hook functions only if there is no ;; other Follow mode buffer. @@ -445,7 +447,6 @@ Keys specific to Follow mode: (remove-hook 'post-command-hook 'follow-post-command-hook) (remove-hook 'window-size-change-functions 'follow-window-size-change))) - (kill-local-variable 'sit*-for-function) (kill-local-variable 'move-to-window-line-group-function) (kill-local-variable 'selected-window-group-function) (kill-local-variable 'pos-visible-in-window-p-group-function) @@ -454,6 +455,9 @@ Keys specific to Follow mode: (kill-local-variable 'window-end-group-function) (kill-local-variable 'window-start-group-function) + (remove-hook 'ispell-update-post-hook 'follow-post-command-hook t) + (remove-hook 'replace-update-post-hook 'follow-post-command-hook t) + (remove-hook 'isearch-update-post-hook 'follow-post-command-hook t) (remove-hook 'after-change-functions 'follow-after-change t) (remove-hook 'compilation-filter-hook 'follow-align-compilation-windows t))) |