diff options
author | Noah Friedman <friedman@splode.com> | 1993-12-01 09:57:04 +0000 |
---|---|---|
committer | Noah Friedman <friedman@splode.com> | 1993-12-01 09:57:04 +0000 |
commit | 3e28e2a19fc2ca1891d64bc849345ca793fc7211 (patch) | |
tree | ffdffc22d0518ec8784cf1d575ff64adb057e76f /lisp/rlogin.el | |
parent | 87b40b2fcf0c33627efd1a5a57f0c51cd243f7e0 (diff) | |
download | emacs-3e28e2a19fc2ca1891d64bc849345ca793fc7211.tar.gz |
(rlogin-filter): initialize `region-begin' to (marker-position proc-mark),
not just (point), whatever random value that may be.
Put bindings for `proc-mark', `region-begin', and `window' in separate setq
forms.
In determining whether window-start readjustment is needed, do not examine
scroll-step; it is irrelevant.
Diffstat (limited to 'lisp/rlogin.el')
-rw-r--r-- | lisp/rlogin.el | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/lisp/rlogin.el b/lisp/rlogin.el index cc8dd9c0bab..faa3f73afe4 100644 --- a/lisp/rlogin.el +++ b/lisp/rlogin.el @@ -23,7 +23,7 @@ ;;; Commentary: ;; Support for remote logins using `rlogin'. -;; $Id: rlogin.el,v 1.12 1993/10/18 07:05:11 friedman Exp rms $ +;; $Id: rlogin.el,v 1.13 1993/10/22 17:12:54 rms Exp friedman $ ;;; Todo: @@ -174,25 +174,16 @@ If `rlogin-mode-hook' is set, run it." (let (proc-mark region-begin window) (save-excursion (set-buffer (process-buffer proc)) - (setq proc-mark (process-mark proc) - region-begin (point) - ;; If process mark is at window start, insert-before-markers - ;; will insert text off-window since it's also inserting before - ;; the start window mark. Make sure we can see the most recent - ;; text. (note: it's a buglet that this isn't necessary if - ;; scroll-step is 0, but that works to our advantage since it - ;; makes the filter a little faster.) - window (and (/= 0 scroll-step) - (= proc-mark (window-start)) + (setq proc-mark (process-mark proc)) + (setq region-begin (marker-position proc-mark)) + ;; If process mark is at window start, insert-before-markers will + ;; insert text off-window since it's also inserting before the start + ;; window mark. Make sure we can see the most recent text. + (setq window (and (= proc-mark (window-start)) (get-buffer-window (current-buffer)))) (goto-char proc-mark) (insert-before-markers string) (goto-char region-begin) - ;; I think something fishy is going on with save-excursion and - ;; search-forward. If you don't make search-forward move to the end - ;; of the search region when it's done, then if the user switches - ;; buffers back and forth, it leaves point sitting behind the - ;; process-mark, so that text inserted later goes off-screen. (while (search-forward "\C-m" proc-mark 'goto-end) (delete-char -1))) ;; Frob window-start outside of save-excursion so it works whether the |