comparison lisp/net/tramp.el @ 87748:e958bc9885ca

* net/tramp.el (tramp-local-host-p): Use `tramp-file-name-host' instead of `tramp-file-name-real-host'.
author Michael Albinus <michael.albinus@gmx.de>
date Mon, 14 Jan 2008 19:36:07 +0000
parents 107ccd98fa12
children c49bc2860fd0
comparison
equal deleted inserted replaced
87747:35fdb36e9ff1 87748:e958bc9885ca
6729 "Return t if this is an out-of-band method, nil otherwise." 6729 "Return t if this is an out-of-band method, nil otherwise."
6730 (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-copy-program)) 6730 (tramp-get-method-parameter (tramp-file-name-method vec) 'tramp-copy-program))
6731 6731
6732 (defun tramp-local-host-p (vec) 6732 (defun tramp-local-host-p (vec)
6733 "Return t if this points to the local host, nil otherwise." 6733 "Return t if this points to the local host, nil otherwise."
6734 (let ((host (tramp-file-name-real-host vec))) 6734 ;; We cannot use `tramp-file-name-real-host'. A port is an
6735 ;; indication for an ssh tunnel or alike.
6736 (let ((host (tramp-file-name-host vec)))
6735 (and 6737 (and
6736 (stringp host) 6738 (stringp host)
6737 (string-match 6739 (string-match
6738 (concat "^" (regexp-opt (list "localhost" (system-name)) t) "$") host)))) 6740 (concat "^" (regexp-opt (list "localhost" (system-name)) t) "$") host))))
6739 6741