[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Rlogin patch for global option flags
From: |
Michael Mauger |
Subject: |
Rlogin patch for global option flags |
Date: |
Fri, 29 Apr 2005 14:07:09 -0700 (PDT) |
I have an elisp program to call `ssh' a la `rlogin'. Essentially it sets
the `rlogin-program' variable to `ssh' and calls `rlogin'. The problem
is that ssh (cygwin's port) running with the w32 version of CVS Emacs
needs the option `-tt' prior to the host name to open the connection
correctly. The problem is that the `rlogin' function treats the `-tt' as
the remote host name because it is the first argument.
The following patch modifies the `rlogin' function command line
interpretation by assuming that the second argument is the remote
hostname if the first argument starts with a dash.
Please review and apply if deemed suitable.
Index: emacs/lisp/net/rlogin.el
===================================================================
RCS file: /c/cvsroot/emacs/emacs/lisp/net/rlogin.el,v
retrieving revision 1.6
diff -c -r1.6 rlogin.el
*** emacs/lisp/net/rlogin.el 10 Apr 2004 05:55:47 -0000 1.6
--- emacs/lisp/net/rlogin.el 28 Apr 2005 23:37:49 -0000
***************
*** 182,188 ****
(append (rlogin-parse-words input-args)
rlogin-explicit-args)
(rlogin-parse-words input-args)))
! (host (car args))
(user (or (car (cdr (member "-l" args)))
(user-login-name)))
(buffer-name (if (string= user (user-login-name))
--- 182,188 ----
(append (rlogin-parse-words input-args)
rlogin-explicit-args)
(rlogin-parse-words input-args)))
! (host (if (string-match "^-" (car args)) (car (cdr args)) (car
args)))
(user (or (car (cdr (member "-l" args)))
(user-login-name)))
(buffer-name (if (string= user (user-login-name))
- Rlogin patch for global option flags,
Michael Mauger <=