]> git.eshelyaron.com Git - emacs.git/commitdiff
(rlogin): If there are option-like elements in the parsed args,
authorThien-Thi Nguyen <ttn@gnuvola.org>
Mon, 2 May 2005 02:45:39 +0000 (02:45 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Mon, 2 May 2005 02:45:39 +0000 (02:45 +0000)
take the host to be the first arg immediately following them.

lisp/ChangeLog
lisp/net/rlogin.el

index 1fed88f666dccbe755478f1b9d6c5ab724b36765..daa3ba63d66c6a6ea4741483d1fd66c735fd7fbc 100644 (file)
@@ -1,8 +1,17 @@
+2005-05-02  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       * net/rlogin.el (rlogin-parse-words): Delete func.
+       (rlogin): Use split-string, not rlogin-parse-words.
+       Also, if there are option-like elements in the parsed args,
+       take the host to be the first arg immediately following them.
+       Suggested by Michael Mauger.
+
 2005-05-01  Luc Teirlinck  <teirllm@auburn.edu>
 
        * subr.el (executing-macro): Use `define-obsolete-variable-alias'.
 
 2005-05-02  Nick Roberts  <nickrob@snap.net.nz>
+
        * progmodes/cc-mode.el (cc-create-define-alist): Use a shell.
        (cc-mode-cpp-program): Rename to cc-define-list-program and
        move to cc-vars.el.
index b49e5bde10cd259e7e94291840c877e4ee1cb0c2..67521ca2e73c7b2dc41ae3916b10dbccb903f1c9 100644 (file)
@@ -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))