From 0fd2d581b71e7dfe0fbda2eb9446fff6f692356f Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 14 Mar 2002 08:52:01 +0000 Subject: [PATCH] (rlogin-carriage-filter): Function removed. (rlogin): Don't install the `rlogin-carriage-filter' filter, as comint removes carriage returns itself now. --- lisp/ChangeLog | 4 ++++ lisp/net/rlogin.el | 42 +++++------------------------------------- 2 files changed, 9 insertions(+), 37 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 218a8ce9b85..de200496b4c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2002-03-14 Miles Bader + * net/rlogin.el (rlogin-carriage-filter): Function removed. + (rlogin): Don't install the `rlogin-carriage-filter' filter, as + comint removes carriage returns itself now. + * rfn-eshadow.el (rfn-eshadow-update-overlay): Bind `inhibit-point-motion-hooks' to t while messing around, to avoid getting hosed by our own intangible property. diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el index 412016f580e..29cac3756b8 100644 --- a/lisp/net/rlogin.el +++ b/lisp/net/rlogin.el @@ -1,12 +1,12 @@ ;;; rlogin.el --- remote login interface -;; Copyright (C) 1992, 93, 94, 95, 97, 1998 Free Software Foundation, Inc. +;; Copyright (C) 1992, 93, 94, 95, 97, 1998, 2002 Free Software Foundation, Inc. ;; Author: Noah Friedman ;; Maintainer: Noah Friedman ;; Keywords: unix, comm -;; $Id: rlogin.el,v 1.45 2000/01/31 18:07:17 fx Exp $ +;; $Id: rlogin.el,v 1.1 2000/03/20 12:52:39 gerd Exp $ ;; This file is part of GNU Emacs. @@ -189,8 +189,7 @@ variable." (user-login-name))) (buffer-name (if (string= user (user-login-name)) (format "*rlogin-%s*" host) - (format "*rlogin-%s@%s*" user host))) - proc) + (format "*rlogin-%s@%s*" user host)))) (cond ((null buffer)) ((stringp buffer) @@ -205,28 +204,8 @@ variable." (setq buffer (get-buffer-create buffer-name)) (pop-to-buffer buffer-name) - (cond - ((comint-check-proc buffer-name)) - (t + (unless (comint-check-proc buffer-name) (comint-exec buffer buffer-name rlogin-program nil args) - (setq proc (get-buffer-process buffer)) - ;; Set process-mark to point-max in case there is text in the - ;; buffer from a previous exited process. - (set-marker (process-mark proc) (point-max)) - - ;; comint-output-filter-functions is treated like a hook: it is - ;; processed via run-hooks or run-hooks-with-args in later versions - ;; of emacs. - ;; comint-output-filter-functions should already have a - ;; permanent-local property, at least in emacs 19.27 or later. - (cond - ((fboundp 'make-local-hook) - (make-local-hook 'comint-output-filter-functions) - (add-hook 'comint-output-filter-functions 'rlogin-carriage-filter - nil t)) - (t - (make-local-variable 'comint-output-filter-functions) - (add-hook 'comint-output-filter-functions 'rlogin-carriage-filter))) (rlogin-mode) @@ -246,7 +225,7 @@ variable." ((null rlogin-directory-tracking-mode)) (t (cd-absolute (concat comint-file-name-prefix "~/")))) - (error nil)))))) + (error nil))))) (put 'rlogin-mode 'mode-class 'special) @@ -326,17 +305,6 @@ local one share the same directories (through NFS)." (set-match-data (match-data)) (nreverse list))) -(defun rlogin-carriage-filter (string) - (let* ((point-marker (point-marker)) - (end (process-mark (get-buffer-process (current-buffer)))) - (beg (or (and (boundp 'comint-last-output-start) - comint-last-output-start) - (- end (length string))))) - (goto-char beg) - (while (search-forward "\C-m" end t) - (delete-char -1)) - (goto-char point-marker))) - (defun rlogin-send-Ctrl-C () (interactive) (process-send-string nil "\C-c")) -- 2.39.2