Mercurial > emacs
diff lisp/net/telnet.el @ 95777:edc51d72cb17
* window.c (Vwindow_point_insertion_type): New var.
(set_window_buffer): Use it.
(syms_of_window): Init and export it to Lisp.
* progmodes/compile.el (compilation-mode):
Set window-point-insertion-type.
(compilation-filter): Don't use insert-before-markers any more.
* emacs-lisp/trace.el (trace-make-advice):
Set window-point-insertion-type in the trace buffer.
* startup.el (normal-top-level): Set window-point-insertion-type in
*Messages*.
* net/telnet.el (telnet-mode): Set window-point-insertion-type.
(telnet-filter): Don't use insert-before-markers any more.
* comint.el (comint-mode): Set window-point-insertion-type.
(comint-output-filter): Don't use insert-before-markers any more.
* button.el (make-text-button): Allow `start' to be a string.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 10 Jun 2008 16:08:48 +0000 |
parents | 91e5880a36c1 |
children | a9dc0e7c3f2b |
line wrap: on
line diff
--- a/lisp/net/telnet.el Tue Jun 10 14:17:32 2008 +0000 +++ b/lisp/net/telnet.el Tue Jun 10 16:08:48 2008 +0000 @@ -159,8 +159,7 @@ (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 @@ -168,7 +167,7 @@ (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)) @@ -245,6 +244,7 @@ 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))