Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!sri-spam!ames!amdcad!cae780!hplabs!hp-pcd!uoregon!omepd!mipos3!cpocd2!nate From: nate@cpocd2.UUCP (Nate Hess) Newsgroups: comp.emacs Subject: terminal-emulator bug (FIX) Message-ID: <600@cpocd2.UUCP> Date: Mon, 4-May-87 04:10:11 EDT Article-I.D.: cpocd2.600 Posted: Mon May 4 04:10:11 1987 Date-Received: Wed, 20-May-87 05:58:54 EDT Reply-To: nate@cpocd2.UUCP (Nate Hess) Organization: Intel Corp., ASIC Services Organization, Chandler AZ. Lines: 55 I received a fix for the bug I described with 'terminal-emulator' from mly of the GNU project: To fix, replace the definitions of te-set-window-start and te-newline in emacs/lisp/terminal.el by the following: (defun te-set-window-start () (let* ((w (get-buffer-window (current-buffer))) (h (if w (window-height w)))) (cond ((not w)) ; buffer not displayed ((>= h (/ (- (point) (point-min)) (1+ te-width))) ;; this is the normal case (set-window-start w (point-min))) ;; this happens if some vandal shrinks our window. ((>= h (/ (- (point-max) (point)) (1+ te-width))) (set-window-start w (- (point-max) (* h (1+ te-width)) -1))) ;; I give up. (t nil)))) (defun te-newline () "Move down a line, optionally do more processing, perhaps wrap/scroll, move to start of new line, clear to end of line." (end-of-line) (cond ((not terminal-more-processing)) ((< (setq te-more-count (1- te-more-count)) 0) (te-set-more-count t)) ((eql te-more-count 0) ;; this doesn't return (te-more-break))) (if (eobp) (progn (delete-region (point-min) (+ (point-min) te-width)) (goto-char (point-min)) (if terminal-scrolling (progn (delete-char 1) (goto-char (point-max)) (insert ?\n)))) (forward-char 1) (delete-region (point) (+ (point) te-width))) (insert-char ?\ te-width) (beginning-of-line) (te-set-window-start)) I wish to express public thanks to the GNU people for their speedy replies to the several bug reports that I have sent in over the past few months. --Nate Hess -- "How do you get your mind to tilt like your hat?" ...!{decwrl|hplabs!oliveb|pur-ee|qantel|amd}!intelca!mipos3!cpocd2!nate : nate@cpocd2.intel.com ATT : (602) 961-2037