* net/tramp.el (tramp-default-method): Don't call `symbol-function'.

Apply `funcall' directly on 'executable-find.
This commit is contained in:
Michael Albinus 2006-12-31 15:03:51 +00:00
parent f57cdb50a7
commit 496f830892
2 changed files with 9 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2006-12-31 Romain Francoise <romain@orebokech.com>
* net/tramp.el (tramp-default-method): Don't call `symbol-function'.
Apply `funcall' directly on 'executable-find.
2006-12-31 Kim F. Storm <storm@cua.dk>
* files.el (auto-mode-case-fold): New defcustom.

View file

@ -693,20 +693,18 @@ various functions for details."
;; another good choice because of the "ControlMaster" option, but
;; this is a more modern alternative in OpenSSH 4, which cannot be
;; taken as default.
(let ((e-f (and (fboundp 'executable-find)
(symbol-function 'executable-find))))
(let ((e-f (fboundp 'executable-find)))
(cond
;; PuTTY is installed.
((and e-f (funcall e-f "pscp"))
((and e-f (funcall 'executable-find "pscp"))
(if (or (fboundp 'password-read)
;; Pageant is running.
(and (fboundp 'w32-window-exists-p)
(funcall (symbol-function 'w32-window-exists-p)
"Pageant" "Pageant")))
(funcall 'w32-window-exists-p "Pageant" "Pageant")))
"pscp"
"plink"))
;; There is an ssh installation.
((and e-f (funcall e-f "scp"))
((and e-f (funcall 'executable-find "scp"))
(if (or (fboundp 'password-read)
;; ssh-agent is running.
(getenv "SSH_AUTH_SOCK")