aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2002-03-14 08:52:01 +0000
committerMiles Bader2002-03-14 08:52:01 +0000
commit0fd2d581b71e7dfe0fbda2eb9446fff6f692356f (patch)
treea0c5ecfa6ed3de4f7373306e9a7594e79fb52b0d
parent8dd511f60761359dabd23ca8c3c874b854f42afc (diff)
downloademacs-0fd2d581b71e7dfe0fbda2eb9446fff6f692356f.tar.gz
emacs-0fd2d581b71e7dfe0fbda2eb9446fff6f692356f.zip
(rlogin-carriage-filter): Function removed.
(rlogin): Don't install the `rlogin-carriage-filter' filter, as comint removes carriage returns itself now.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/net/rlogin.el42
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 @@
12002-03-14 Miles Bader <miles@gnu.org> 12002-03-14 Miles Bader <miles@gnu.org>
2 2
3 * net/rlogin.el (rlogin-carriage-filter): Function removed.
4 (rlogin): Don't install the `rlogin-carriage-filter' filter, as
5 comint removes carriage returns itself now.
6
3 * rfn-eshadow.el (rfn-eshadow-update-overlay): Bind 7 * rfn-eshadow.el (rfn-eshadow-update-overlay): Bind
4 `inhibit-point-motion-hooks' to t while messing around, to avoid 8 `inhibit-point-motion-hooks' to t while messing around, to avoid
5 getting hosed by our own intangible property. 9 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 @@
1;;; rlogin.el --- remote login interface 1;;; rlogin.el --- remote login interface
2 2
3;; Copyright (C) 1992, 93, 94, 95, 97, 1998 Free Software Foundation, Inc. 3;; Copyright (C) 1992, 93, 94, 95, 97, 1998, 2002 Free Software Foundation, Inc.
4 4
5;; Author: Noah Friedman 5;; Author: Noah Friedman
6;; Maintainer: Noah Friedman <friedman@splode.com> 6;; Maintainer: Noah Friedman <friedman@splode.com>
7;; Keywords: unix, comm 7;; Keywords: unix, comm
8 8
9;; $Id: rlogin.el,v 1.45 2000/01/31 18:07:17 fx Exp $ 9;; $Id: rlogin.el,v 1.1 2000/03/20 12:52:39 gerd Exp $
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12 12
@@ -189,8 +189,7 @@ variable."
189 (user-login-name))) 189 (user-login-name)))
190 (buffer-name (if (string= user (user-login-name)) 190 (buffer-name (if (string= user (user-login-name))
191 (format "*rlogin-%s*" host) 191 (format "*rlogin-%s*" host)
192 (format "*rlogin-%s@%s*" user host))) 192 (format "*rlogin-%s@%s*" user host))))
193 proc)
194 193
195 (cond ((null buffer)) 194 (cond ((null buffer))
196 ((stringp buffer) 195 ((stringp buffer)
@@ -205,28 +204,8 @@ variable."
205 (setq buffer (get-buffer-create buffer-name)) 204 (setq buffer (get-buffer-create buffer-name))
206 (pop-to-buffer buffer-name) 205 (pop-to-buffer buffer-name)
207 206
208 (cond 207 (unless (comint-check-proc buffer-name)
209 ((comint-check-proc buffer-name))
210 (t
211 (comint-exec buffer buffer-name rlogin-program nil args) 208 (comint-exec buffer buffer-name rlogin-program nil args)
212 (setq proc (get-buffer-process buffer))
213 ;; Set process-mark to point-max in case there is text in the
214 ;; buffer from a previous exited process.
215 (set-marker (process-mark proc) (point-max))
216
217 ;; comint-output-filter-functions is treated like a hook: it is
218 ;; processed via run-hooks or run-hooks-with-args in later versions
219 ;; of emacs.
220 ;; comint-output-filter-functions should already have a
221 ;; permanent-local property, at least in emacs 19.27 or later.
222 (cond
223 ((fboundp 'make-local-hook)
224 (make-local-hook 'comint-output-filter-functions)
225 (add-hook 'comint-output-filter-functions 'rlogin-carriage-filter
226 nil t))
227 (t
228 (make-local-variable 'comint-output-filter-functions)
229 (add-hook 'comint-output-filter-functions 'rlogin-carriage-filter)))
230 209
231 (rlogin-mode) 210 (rlogin-mode)
232 211
@@ -246,7 +225,7 @@ variable."
246 ((null rlogin-directory-tracking-mode)) 225 ((null rlogin-directory-tracking-mode))
247 (t 226 (t
248 (cd-absolute (concat comint-file-name-prefix "~/")))) 227 (cd-absolute (concat comint-file-name-prefix "~/"))))
249 (error nil)))))) 228 (error nil)))))
250 229
251(put 'rlogin-mode 'mode-class 'special) 230(put 'rlogin-mode 'mode-class 'special)
252 231
@@ -326,17 +305,6 @@ local one share the same directories (through NFS)."
326 (set-match-data (match-data)) 305 (set-match-data (match-data))
327 (nreverse list))) 306 (nreverse list)))
328 307
329(defun rlogin-carriage-filter (string)
330 (let* ((point-marker (point-marker))
331 (end (process-mark (get-buffer-process (current-buffer))))
332 (beg (or (and (boundp 'comint-last-output-start)
333 comint-last-output-start)
334 (- end (length string)))))
335 (goto-char beg)
336 (while (search-forward "\C-m" end t)
337 (delete-char -1))
338 (goto-char point-marker)))
339
340(defun rlogin-send-Ctrl-C () 308(defun rlogin-send-Ctrl-C ()
341 (interactive) 309 (interactive)
342 (process-send-string nil "\C-c")) 310 (process-send-string nil "\C-c"))