From: Michael Albinus Date: Wed, 27 Jul 2011 11:22:22 +0000 (+0200) Subject: * net/tramp-sh.el (tramp-maybe-send-script): Don't let-bind the X-Git-Tag: emacs-pretest-24.0.90~104^2~159^2~12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8a7eddd7bf52d44f9e4e6a900fbb9ac6ecfdc402;p=emacs.git * net/tramp-sh.el (tramp-maybe-send-script): Don't let-bind the connection process, it could be nil. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ebbd696eddf..afa15eab24e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-07-27 Michael Albinus + + * net/tramp-sh.el (tramp-maybe-send-script): Don't let-bind the + connection process, it could be nil. + 2011-07-27 Leo Liu Simplify url handling in rcirc-mode. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index bcd23572908..5c497748943 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3457,8 +3457,10 @@ Fall back to normal file name handler if no Tramp handler exists." (defun tramp-maybe-send-script (vec script name) "Define in remote shell function NAME implemented as SCRIPT. Only send the definition if it has not already been done." - (let* ((p (tramp-get-connection-process vec)) - (scripts (tramp-get-connection-property p "scripts" nil))) + ;; We cannot let-bind (tramp-get-connection-process vec) because it + ;; might be nil. + (let ((scripts (tramp-get-connection-property + (tramp-get-connection-process vec) "scripts" nil))) (unless (member name scripts) (tramp-with-progress-reporter vec 5 (format "Sending script `%s'" name) ;; The script could contain a call of Perl. This is masked with `%s'. @@ -3467,7 +3469,8 @@ Only send the definition if it has not already been done." (format "%s () {\n%s\n}" name (format script (tramp-get-remote-perl vec))) "Script %s sending failed" name) - (tramp-set-connection-property p "scripts" (cons name scripts)))))) + (tramp-set-connection-property + (tramp-get-connection-process vec) "scripts" (cons name scripts)))))) (defun tramp-set-auto-save () (when (and ;; ange-ftp has its own auto-save mechanism