[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111847: * net/tramp.el (tramp-ssh-co
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111847: * net/tramp.el (tramp-ssh-controlmaster-template): Make it a |
Date: |
Thu, 21 Feb 2013 15:23:12 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111847
committer: Michael Albinus <address@hidden
branch nick: trunk
timestamp: Thu 2013-02-21 15:23:12 +0100
message:
* net/tramp.el (tramp-ssh-controlmaster-template): Make it a
defconst. Apply independent check for ControlPersist.
modified:
lisp/ChangeLog
lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-02-21 13:36:16 +0000
+++ b/lisp/ChangeLog 2013-02-21 14:23:12 +0000
@@ -1,5 +1,8 @@
2013-02-21 Michael Albinus <address@hidden>
+ * net/tramp.el (tramp-ssh-controlmaster-template): Make it a
+ defconst. Apply independent check for ControlPersist.
+
* net/tramp-sh.el (tramp-sh-handle-set-file-times): Set $UTC only
temporarily, via "env".
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-02-14 13:32:04 +0000
+++ b/lisp/net/tramp.el 2013-02-21 14:23:12 +0000
@@ -281,16 +281,24 @@
useful only in combination with `tramp-default-proxies-alist'.")
;;;###tramp-autoload
-(defvar tramp-ssh-controlmaster-template
+(defconst tramp-ssh-controlmaster-template
+ (let (result)
(ignore-errors
(with-temp-buffer
(call-process "ssh" nil t nil "-o" "ControlMaster")
(goto-char (point-min))
(when (search-forward-regexp "Missing ControlMaster argument" nil t)
- '("-o" "address@hidden:%%p"
- "-o" "ControlMaster=auto"
- "-o" "ControlPersist=no"))))
- "Call ssh to detect whether it supports the ControlMaster argument.
+ (setq result
+ '("-o" "address@hidden:%%p"
+ "-o" "ControlMaster=auto"))))
+ (when result
+ (with-temp-buffer
+ (call-process "ssh" nil t nil "-o" "ControlPersist")
+ (goto-char (point-min))
+ (when (search-forward-regexp "Missing ControlPersist argument" nil t)
+ (setq result (append result '("-o" "ControlPersist=no")))))))
+ result)
+ "Call ssh to detect whether it supports the Control* arguments.
Return a template to be used in `tramp-methods'.")
(defcustom tramp-default-method
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111847: * net/tramp.el (tramp-ssh-controlmaster-template): Make it a,
Michael Albinus <=