(browse-url-file-url): Encode file name on conversion to URL.
[bpt/emacs.git] / lisp / net / rlogin.el
index b49e5bd..74b9e03 100644 (file)
@@ -1,6 +1,7 @@
 ;;; rlogin.el --- remote login interface
 
-;; Copyright (C) 1992, 93, 94, 95, 97, 1998, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 2002, 2003, 2004,
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Noah Friedman
 ;; Maintainer: Noah Friedman <friedman@splode.com>
@@ -20,8 +21,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -41,7 +42,7 @@
 (require 'shell)
 
 (defgroup rlogin nil
-  "Remote login interface"
+  "Remote login interface."
   :group 'processes
   :group 'unix)
 
@@ -182,7 +183,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))