diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2005-05-02 02:45:39 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2005-05-02 02:45:39 +0000 |
commit | 9a4798350aedb99a6ec498b92b577c9d8555d9eb (patch) | |
tree | 089ef57dcfe45e17d9366efb291ff73726f18755 /lisp/net/rlogin.el | |
parent | 19a31306a06a28308bc6f38a2c6ccd81aa5235ce (diff) | |
download | emacs-9a4798350aedb99a6ec498b92b577c9d8555d9eb.tar.gz |
(rlogin): If there are option-like elements in the parsed args,
take the host to be the first arg immediately following them.
Diffstat (limited to 'lisp/net/rlogin.el')
-rw-r--r-- | lisp/net/rlogin.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el index b49e5bde10c..67521ca2e73 100644 --- a/lisp/net/rlogin.el +++ b/lisp/net/rlogin.el @@ -182,7 +182,12 @@ variable." (append (split-string input-args) rlogin-explicit-args) (split-string input-args))) - (host (car args)) + (host (let ((tail args)) + ;; Find first arg that doesn't look like an option. + ;; This still loses for args that take values, feh. + (while (and tail (= ?- (aref (car tail) 0))) + (setq tail (cdr tail))) + (car tail))) (user (or (car (cdr (member "-l" args))) (user-login-name))) (buffer-name (if (string= user (user-login-name)) |