;;; telnet.el --- run a telnet session from within an Emacs buffer
;; Copyright (C) 1985, 1988, 1992, 1994, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: William F. Schelter
;; Maintainer: FSF
(comint-send-string proc telnet-new-line)))
(defun telnet-filter (proc string)
- (save-excursion
- (set-buffer (process-buffer proc))
+ (with-current-buffer (process-buffer proc)
(let* ((last-insertion (marker-position (process-mark proc)))
(delta (- (point) last-insertion))
(ie (and comint-last-input-end
(w (get-buffer-window (current-buffer)))
(ws (and w (window-start w))))
(goto-char last-insertion)
- (insert-before-markers string)
+ (insert string)
(set-marker comint-last-output-start last-insertion)
(set-marker (process-mark proc) (point))
(if ws (set-window-start w ws t))
There is a variable ``telnet-interrupt-string'' which is the character
sent to try to stop execution of a job on the remote host.
Data is sent to the remote host when RET is typed."
+ (set (make-local-variable 'window-point-insertion-type) t)
(set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern)
(set (make-local-variable 'comint-use-prompt-regexp) t))