diff options
| -rw-r--r-- | lisp/follow.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/follow.el b/lisp/follow.el index 80f143fba72..f23504da36e 100644 --- a/lisp/follow.el +++ b/lisp/follow.el | |||
| @@ -5,9 +5,9 @@ | |||
| 5 | ;; Author: Anders Lindgren <andersl@csd.uu.se> | 5 | ;; Author: Anders Lindgren <andersl@csd.uu.se> |
| 6 | ;; Maintainer: Anders Lindgren <andersl@csd.uu.se> | 6 | ;; Maintainer: Anders Lindgren <andersl@csd.uu.se> |
| 7 | ;; Created: 25 May 1995 | 7 | ;; Created: 25 May 1995 |
| 8 | ;; Version: 1.6 | 8 | ;; Version: 1.7 |
| 9 | ;; Keywords: display, window, minor-mode | 9 | ;; Keywords: display, window, minor-mode |
| 10 | ;; Date: 20 Feb 1996 | 10 | ;; Date: 27 May 1997 |
| 11 | 11 | ||
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | 13 | ||
| @@ -49,7 +49,7 @@ | |||
| 49 | ;; side-by-side window are used. The user can, with the help of Follow | 49 | ;; side-by-side window are used. The user can, with the help of Follow |
| 50 | ;; mode, use two full-height windows as though they would have been | 50 | ;; mode, use two full-height windows as though they would have been |
| 51 | ;; one. Imagine yourself editing a large function, or section of text, | 51 | ;; one. Imagine yourself editing a large function, or section of text, |
| 52 | ;; and beeing able to use 144 lines instead of the normal 72... (your | 52 | ;; and being able to use 144 lines instead of the normal 72... (your |
| 53 | ;; mileage may vary). | 53 | ;; mileage may vary). |
| 54 | 54 | ||
| 55 | ;; The latest version, and a demonstration, are avaiable at: | 55 | ;; The latest version, and a demonstration, are avaiable at: |
| @@ -467,7 +467,7 @@ Used by `follow-window-size-change'.") | |||
| 467 | (eval-when-compile (require 'reporter)) | 467 | (eval-when-compile (require 'reporter)) |
| 468 | 468 | ||
| 469 | (defun follow-submit-feedback () | 469 | (defun follow-submit-feedback () |
| 470 | "Sumbit feedback on Follow mode to the author: andersl@csd.uu.se" | 470 | "Submit feedback on Follow mode to the author: andersl@csd.uu.se" |
| 471 | (interactive) | 471 | (interactive) |
| 472 | (require 'reporter) | 472 | (require 'reporter) |
| 473 | (and (y-or-n-p "Do you really want to submit a report on Follow mode? ") | 473 | (and (y-or-n-p "Do you really want to submit a report on Follow mode? ") |
| @@ -729,7 +729,7 @@ Follow mode comes to its prime when used on a large screen and two | |||
| 729 | side-by-side window are used. The user can, with the help of Follow | 729 | side-by-side window are used. The user can, with the help of Follow |
| 730 | mode, use two full-height windows as though they would have been | 730 | mode, use two full-height windows as though they would have been |
| 731 | one. Imagine yourself editing a large function, or section of text, | 731 | one. Imagine yourself editing a large function, or section of text, |
| 732 | and beeing able to use 144 lines instead of the normal 72... (your | 732 | and being able to use 144 lines instead of the normal 72... (your |
| 733 | mileage may vary). | 733 | mileage may vary). |
| 734 | 734 | ||
| 735 | To split one large window into two side-by-side windows, the commands | 735 | To split one large window into two side-by-side windows, the commands |
| @@ -2206,7 +2206,11 @@ report this using the `follow-submit-feedback' function." | |||
| 2206 | ;; return to the original window. | 2206 | ;; return to the original window. |
| 2207 | (if return-to-orig-win | 2207 | (if return-to-orig-win |
| 2208 | (select-window orig-win)) | 2208 | (select-window orig-win)) |
| 2209 | (set-buffer old-buffer)) | 2209 | ;; Restore the orignal buffer, unless the filter explicitly |
| 2210 | ;; changed buffer or killed the old buffer. | ||
| 2211 | (if (and (eq buf (current-buffer)) | ||
| 2212 | (buffer-name old-buffer)) | ||
| 2213 | (set-buffer old-buffer))) | ||
| 2210 | 2214 | ||
| 2211 | (follow-invalidate-cache) | 2215 | (follow-invalidate-cache) |
| 2212 | 2216 | ||
| @@ -2340,8 +2344,8 @@ report this using the `follow-submit-feedback' function." | |||
| 2340 | ;;; called from other places, e.g. `post-command-hook' and | 2344 | ;;; called from other places, e.g. `post-command-hook' and |
| 2341 | ;;; `post-command-idle-hook'. | 2345 | ;;; `post-command-idle-hook'. |
| 2342 | 2346 | ||
| 2343 | ;; If this function is called it is to late for this window, but | 2347 | ;; If this function is called it is too late for this window, but |
| 2344 | ;; we might save other windows from beeing recentered. | 2348 | ;; we might save other windows from being recentered. |
| 2345 | 2349 | ||
| 2346 | (if (and follow-avoid-tail-recenter-p (boundp 'window-scroll-functions)) | 2350 | (if (and follow-avoid-tail-recenter-p (boundp 'window-scroll-functions)) |
| 2347 | (add-hook 'window-scroll-functions 'follow-avoid-tail-recenter t)) | 2351 | (add-hook 'window-scroll-functions 'follow-avoid-tail-recenter t)) |