diff options
| author | Michael Albinus | 2011-07-27 13:22:22 +0200 |
|---|---|---|
| committer | Michael Albinus | 2011-07-27 13:22:22 +0200 |
| commit | 8a7eddd7bf52d44f9e4e6a900fbb9ac6ecfdc402 (patch) | |
| tree | 87b3cef8df31bc2563b2abe1172882f4fcafa627 | |
| parent | 1ddd96f5cf0b06846edd03d6b225c31206cee0b7 (diff) | |
| download | emacs-8a7eddd7bf52d44f9e4e6a900fbb9ac6ecfdc402.tar.gz emacs-8a7eddd7bf52d44f9e4e6a900fbb9ac6ecfdc402.zip | |
* net/tramp-sh.el (tramp-maybe-send-script): Don't let-bind the
connection process, it could be nil.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ebbd696eddf..afa15eab24e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-07-27 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp-sh.el (tramp-maybe-send-script): Don't let-bind the | ||
| 4 | connection process, it could be nil. | ||
| 5 | |||
| 1 | 2011-07-27 Leo Liu <sdl.web@gmail.com> | 6 | 2011-07-27 Leo Liu <sdl.web@gmail.com> |
| 2 | 7 | ||
| 3 | Simplify url handling in rcirc-mode. | 8 | 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." | |||
| 3457 | (defun tramp-maybe-send-script (vec script name) | 3457 | (defun tramp-maybe-send-script (vec script name) |
| 3458 | "Define in remote shell function NAME implemented as SCRIPT. | 3458 | "Define in remote shell function NAME implemented as SCRIPT. |
| 3459 | Only send the definition if it has not already been done." | 3459 | Only send the definition if it has not already been done." |
| 3460 | (let* ((p (tramp-get-connection-process vec)) | 3460 | ;; We cannot let-bind (tramp-get-connection-process vec) because it |
| 3461 | (scripts (tramp-get-connection-property p "scripts" nil))) | 3461 | ;; might be nil. |
| 3462 | (let ((scripts (tramp-get-connection-property | ||
| 3463 | (tramp-get-connection-process vec) "scripts" nil))) | ||
| 3462 | (unless (member name scripts) | 3464 | (unless (member name scripts) |
| 3463 | (tramp-with-progress-reporter vec 5 (format "Sending script `%s'" name) | 3465 | (tramp-with-progress-reporter vec 5 (format "Sending script `%s'" name) |
| 3464 | ;; The script could contain a call of Perl. This is masked with `%s'. | 3466 | ;; 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." | |||
| 3467 | (format "%s () {\n%s\n}" name | 3469 | (format "%s () {\n%s\n}" name |
| 3468 | (format script (tramp-get-remote-perl vec))) | 3470 | (format script (tramp-get-remote-perl vec))) |
| 3469 | "Script %s sending failed" name) | 3471 | "Script %s sending failed" name) |
| 3470 | (tramp-set-connection-property p "scripts" (cons name scripts)))))) | 3472 | (tramp-set-connection-property |
| 3473 | (tramp-get-connection-process vec) "scripts" (cons name scripts)))))) | ||
| 3471 | 3474 | ||
| 3472 | (defun tramp-set-auto-save () | 3475 | (defun tramp-set-auto-save () |
| 3473 | (when (and ;; ange-ftp has its own auto-save mechanism | 3476 | (when (and ;; ange-ftp has its own auto-save mechanism |