;; to turn it off.
-;; The command `follow-delete-other-windows-and-split' maximises the
+;; The command `follow-delete-other-windows-and-split' maximizes the
;; visible area of the current buffer.
;;
;; I recommend adding it, and `follow-mode', to hotkeys in the global
;; (global-set-key [f7] 'follow-delete-other-windows-and-split)
-;; There exist two system variables that control the appearence of
+;; There exist two system variables that control the appearance of
;; lines wider than the window containing them. The default is to
;; truncate long lines whenever a window isn't as wide as the frame.
;;
;; (setq pixel-vertical-clip-threshold 30)
-;; The correct way to configurate Follow mode, or any other mode for
+;; The correct way to configure Follow mode, or any other mode for
;; that matter, is to create one or more functions that do
;; whatever you would like to do. These functions are then added to
;; a hook.
;; follow-delete-other-windows-and-split C-c . 1
;; Maximize the visible area of the current buffer,
;; and enter Follow mode. This is a very convenient
-;; way to start Follow mode, hence we recomend that
+;; way to start Follow mode, hence we recommend that
;; this command be added to the global keymap.
;;
;; follow-recenter C-c . C-l
;; global map.
(easy-menu-add-item nil '("Tools")
'("Follow"
- ;; The Emacs code used to just grey out operations when follow-mode was
+ ;; The Emacs code used to just gray out operations when follow-mode was
;; not enabled, whereas the XEmacs code used to remove it altogether.
;; Not sure which is preferable, but clearly the preference should not
;; depend on the flavor.
(put 'follow-mode 'permanent-local t)
;;;###autoload
(define-minor-mode follow-mode
- "Minor mode that combines windows into one tall virtual window.
+ "Toggle Follow mode.
+With a prefix argument ARG, enable Follow mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-The feeling of a \"virtual window\" has been accomplished by the use
-of two major techniques:
+Follow mode is a minor mode that combines windows into one tall
+virtual window. This is accomplished by two main techniques:
* The windows always displays adjacent sections of the buffer.
This means that whenever one window is moved, all the
mileage may vary).
To split one large window into two side-by-side windows, the commands
-`\\[split-window-horizontally]' or \
+`\\[split-window-right]' or \
`M-x follow-delete-other-windows-and-split' can be used.
Only windows displayed in the same frame follow each other.
;; `scroll-up' and `-down', but for windows in Follow mode.
;;
-;; Almost like the real thing, excpet when the cursor ends up outside
+;; Almost like the real thing, except when the cursor ends up outside
;; the top or bottom... In our case however, we end up outside the
-;; window and hence we are recenterd. Should we let `recenter' handle
+;; window and hence we are recentered. Should we let `recenter' handle
;; the point position we would never leave the selected window. To do
;; it ourselves we would need to do our own redisplay, which is easier
;; said than done. (Why didn't I do a real display abstraction from
selected if the original window is the first one in the frame.
To bind this command to a hotkey, place the following line
-in your `~/.emacs' file, replacing [f7] by your favourite key:
+in your `~/.emacs' file, replacing [f7] by your favorite key:
(global-set-key [f7] 'follow-delete-other-windows-and-split)"
(interactive "P")
(let ((other (or (and (null arg)
(< (prefix-numeric-value arg) 0))))
(start (window-start)))
(delete-other-windows)
- (split-window-horizontally)
+ (split-window-right)
(if other
(progn
(other-window 1)
(save-restriction
;; Fix a mis-feature in `vertical-motion':
;; The start of the window is assumed to
- ;; coinside with the start of a line.
+ ;; coincide with the start of a line.
(narrow-to-region (point) (point-max))
(not (= height (vertical-motion height))))))
(list (point) buffer-end-p))))))
;; it wasn't just moved here. (I.e. M-> shall not unconditionally place
;; the point in the selected window.)
;;
-;; (Compatibility cludge: in Emacs `window-end' is equal to `point-max';
+;; (Compatibility kludge: in Emacs `window-end' is equal to `point-max';
;; in XEmacs, it is equal to `point-max + 1'. Should I really bother
;; checking `window-end' now when I check `end-of-buffer' explicitly?)