emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105326: * net/tramp-sh.el (tramp-may


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105326: * net/tramp-sh.el (tramp-maybe-send-script): Don't let-bind the
Date: Wed, 27 Jul 2011 13:22:22 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105326
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2011-07-27 13:22:22 +0200
message:
  * net/tramp-sh.el (tramp-maybe-send-script): Don't let-bind the
  connection process, it could be nil.
modified:
  lisp/ChangeLog
  lisp/net/tramp-sh.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-27 03:44:45 +0000
+++ b/lisp/ChangeLog    2011-07-27 11:22:22 +0000
@@ -1,3 +1,8 @@
+2011-07-27  Michael Albinus  <address@hidden>
+
+       * net/tramp-sh.el (tramp-maybe-send-script): Don't let-bind the
+       connection process, it could be nil.
+
 2011-07-27  Leo Liu  <address@hidden>
 
        Simplify url handling in rcirc-mode.

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2011-07-24 09:56:26 +0000
+++ b/lisp/net/tramp-sh.el      2011-07-27 11:22:22 +0000
@@ -3457,8 +3457,10 @@
 (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 @@
         (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]