Commit e8912d5b authored by Michael Albinus's avatar Michael Albinus

Sync with Tramp 2.3.4-pre

* doc/misc/trampver.texi: Change version to "2.3.4-pre

* lisp/net/tramp.el (tramp-mode, tramp-verbose)
(tramp-backup-directory-alist, tramp-auto-save-directory)
(tramp-encoding-shell, tramp-encoding-command-switch)
(tramp-encoding-command-interactive, tramp-default-method)
(tramp-default-method-alist, tramp-default-user)
(tramp-default-user-alist, tramp-default-host)
(tramp-default-host-alist, tramp-default-proxies-alist)
(tramp-save-ad-hoc-proxies, tramp-restricted-shell-hosts-alist)
(tramp-local-end-of-line, tramp-rsh-end-of-line)
(tramp-login-prompt-regexp, tramp-shell-prompt-pattern)
(tramp-password-prompt-regexp, tramp-wrong-passwd-regexp)
(tramp-yesno-prompt-regexp, tramp-yn-prompt-regexp)
(tramp-terminal-prompt-regexp)
(tramp-operation-not-permitted-regexp, tramp-copy-failed-regexp)
(tramp-process-alive-regexp, tramp-chunksize)
(tramp-process-connection-type, tramp-connection-timeout)
(tramp-connection-min-time-diff)
(tramp-completion-reread-directory-timeout):
* lisp/net/tramp-adb.el (tramp-adb-program)
(tramp-adb-connect-if-not-connected, tramp-adb-prompt):
* lisp/net/tramp-cache.el (tramp-connection-properties)
(tramp-persistency-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods)
(tramp-gvfs-zeroconf-domain, tramp-bluez-discover-devices-timeout):
* lisp/net/tramp-sh.el (tramp-inline-compress-start-size)
(tramp-copy-size-limit, tramp-terminal-type)
(tramp-histfile-override, tramp-use-ssh-controlmaster-options)
(tramp-remote-path, tramp-remote-process-environment)
(tramp-sh-extra-args):
* lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program)
(tramp-smb-conf, tramp-smb-winexe-program)
(tramp-smb-winexe-shell-command)
(tramp-smb-winexe-shell-command-switch):
Dont't require 'tramp.  (Bug#31558)

* lisp/net/tramp.el (tramp-accept-process-output):
* lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-start-file-process):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-handle-start-file-process): Suppress timers.

* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
Write proper message.

* lisp/net/tramp-cmds.el (tramp-change-syntax):
Use `customize-set-variable'.

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Ensure proper EOL handling for Darwin.
(tramp-find-inline-compress): Improve command quoting for w32.
Reported by Chris Zheng <chriszheng99@gmail.com>.
(tramp-open-connection-setup-interactive-shell): Wrap both echo
calls in parentheses, in order to avoid double prompt.

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_RESOURCE_NAME_NOT_FOUND".

* lisp/net/tramp.el (tramp-default-user-alist)
(tramp-default-host-alist): Fix docstring.
(tramp-dissect-file-name): Adapt docstring.  (Bug#30904)
(tramp-make-tramp-file-name): Check, that method is
not empty.  (Bug#30038)
(tramp-message-show-message): Change default.

* lisp/net/trampver.el: Change version to "2.3.4-pre".

* test/lisp/net/tramp-tests.el (ert-x): Require it.
(tramp-test10-write-region): Extend test.
(tramp--test-emacs27-p, tramp--test-windows-nt): New defuns.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test21-file-links, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files): Use them.
(tramp-test21-file-links): Do not call `make-symbolic-link' on w32.
Fix file name quoting test.
(tramp-test32-environment-variables-and-port-numbers):
Adapt check for systems which do not support "echo -n".  (Bug#29712)
(tramp-test36-find-backup-file-name): Call also
`convert-standard-filename' due to w32.
(tramp-test41-asynchronous-requests):
Use $REMOTE_PARALLEL_PROCESSES.  Flush cache prior file operations.
(tramp-test42-auto-load, tramp-test42-delay-load)
(tramp-test42-recursive-load, tramp-test42-remote-load-path):
Quote command due to w32.
parent 9a7a2e91
......@@ -8,7 +8,7 @@
@c In the Tramp GIT, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
@set trampver 2.3.3.26.1
@set trampver 2.3.4-pre
@c Other flags from configuration
@set instprefix /usr/local
......
......@@ -40,8 +40,7 @@
"Name of the Android Debug Bridge program."
:group 'tramp
:version "24.4"
:type 'string
:require 'tramp)
:type 'string)
;;;###tramp-autoload
(defcustom tramp-adb-connect-if-not-connected nil
......@@ -49,8 +48,7 @@
It is used for TCP/IP devices."
:group 'tramp
:version "25.1"
:type 'boolean
:require 'tramp)
:type 'boolean)
;;;###tramp-autoload
(defconst tramp-adb-method "adb"
......@@ -62,8 +60,7 @@ It is used for TCP/IP devices."
"Regexp used as prompt in almquist shell."
:type 'string
:version "24.4"
:group 'tramp
:require 'tramp)
:group 'tramp)
(defconst tramp-adb-ls-date-regexp
"[[:space:]][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9][[:space:]][0-9][0-9]:[0-9][0-9][[:space:]]"
......@@ -689,13 +686,22 @@ But handle the case, if the \"test\" command is not available."
(tramp-error v 'file-error "Cannot write: `%s'" filename))
(delete-file tmpfile)))
(when (or (eq visit t) (stringp visit))
(set-visited-file-modtime))
(unless (equal curbuf (current-buffer))
(tramp-error
v 'file-error
"Buffer has changed from `%s' to `%s'" curbuf (current-buffer))))))
"Buffer has changed from `%s' to `%s'" curbuf (current-buffer)))
;; Set file modification time.
(when (or (eq visit t) (stringp visit))
(set-visited-file-modtime
(tramp-compat-file-attribute-modification-time
(file-attributes filename))))
;; The end.
(when (and (null noninteractive)
(or (eq visit t) (null visit) (stringp visit)))
(tramp-message v 0 "Wrote %s" filename))
(run-hooks 'tramp-handle-write-region-hook))))
(defun tramp-adb-handle-set-file-modes (filename mode)
"Like `set-file-modes' for Tramp files."
......@@ -1046,7 +1052,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(or (null program) tramp-process-connection-type))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name)
(i 0))
(i 0)
;; We do not want to run timers.
timer-list timer-idle-list)
(while (get-process name1)
;; NAME must be unique as process name.
......
......@@ -73,16 +73,14 @@ details see the info pages."
:version "24.4"
:type '(repeat (list (choice :tag "File Name regexp" regexp (const nil))
(choice :tag " Property" string)
(choice :tag " Value" sexp)))
:require 'tramp)
(choice :tag " Value" sexp))))
;;;###tramp-autoload
(defcustom tramp-persistency-file-name
(expand-file-name (locate-user-emacs-file "tramp"))
"File which keeps connection history for Tramp connections."
:group 'tramp
:type 'file
:require 'tramp)
:type 'file)
(defvar tramp-cache-data-changed nil
"Whether persistent cache data have been changed.")
......
......@@ -49,7 +49,7 @@ SYNTAX can be one of the symbols `default' (default),
(unless (string-equal input "")
(list (intern input)))))
(when syntax
(custom-set-variables `(tramp-syntax ',syntax))))
(customize-set-variable 'tramp-syntax syntax)))
(defun tramp-list-tramp-buffers ()
"Return a list of all Tramp connection buffers."
......
......@@ -69,7 +69,7 @@
;; 'car
;; (dbus-call-method
;; :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
;; tramp-gvfs-interface-mounttracker "listMountableInfo")))
;; tramp-gvfs-interface-mounttracker "ListMountableInfo")))
;; Note that all other connection methods are not tested, beside the
;; ones offered for customization in `tramp-gvfs-methods'. If you
......@@ -122,8 +122,7 @@
(const "obex")
(const "sftp")
(const "smb")
(const "synce")))
:require 'tramp)
(const "synce"))))
;; Add defaults for `tramp-default-user-alist' and `tramp-default-host-alist'.
;;;###tramp-autoload
......@@ -141,8 +140,7 @@
"Zeroconf domain to be used for discovering services, like host names."
:group 'tramp
:version "23.2"
:type 'string
:require 'tramp)
:type 'string)
;; Add the methods to `tramp-methods', in order to allow minibuffer
;; completion.
......@@ -393,8 +391,7 @@ completion, nil means to use always cached values for discovered
devices."
:group 'tramp
:version "23.2"
:type '(choice (const nil) integer)
:require 'tramp)
:type '(choice (const nil) integer))
(defvar tramp-bluez-discovery nil
"Indicator for a running bluetooth device discovery.
......@@ -1270,7 +1267,8 @@ file-notify events."
(file-attributes filename))))
;; The end.
(when (or (eq visit t) (null visit) (stringp visit))
(when (and (null noninteractive)
(or (eq visit t) (null visit) (stringp visit)))
(tramp-message v 0 "Wrote %s" filename))
(run-hooks 'tramp-handle-write-region-hook)))
......
......@@ -47,8 +47,7 @@ When inline transfer, compress transferred data of file
whose size is this value or above (up to `tramp-copy-size-limit').
If it is nil, no compression at all will be applied."
:group 'tramp
:type '(choice (const nil) integer)
:require 'tramp)
:type '(choice (const nil) integer))
;;;###tramp-autoload
(defcustom tramp-copy-size-limit 10240
......@@ -56,8 +55,7 @@ If it is nil, no compression at all will be applied."
out-of-the-band copy.
If it is nil, out-of-the-band copy will be used without a check."
:group 'tramp
:type '(choice (const nil) integer)
:require 'tramp)
:type '(choice (const nil) integer))
;;;###tramp-autoload
(defcustom tramp-terminal-type "dumb"
......@@ -66,8 +64,7 @@ Because Tramp wants to parse the output of the remote shell, it is easily
confused by ANSI color escape sequences and suchlike. Often, shell init
files conditionalize this setup based on the TERM environment variable."
:group 'tramp
:type 'string
:require 'tramp)
:type 'string)
;;;###tramp-autoload
(defcustom tramp-histfile-override "~/.tramp_history"
......@@ -84,8 +81,7 @@ the default storage location, e.g. \"$HOME/.sh_history\"."
:version "25.2"
:type '(choice (const :tag "Do not override HISTFILE" nil)
(const :tag "Unset HISTFILE" t)
(string :tag "Redirect to a file"))
:require 'tramp)
(string :tag "Redirect to a file")))
;;;###tramp-autoload
(defconst tramp-display-escape-sequence-regexp "\e[[;0-9]+m"
......@@ -119,8 +115,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
"Whether to use `tramp-ssh-controlmaster-options'."
:group 'tramp
:version "24.4"
:type 'boolean
:require 'tramp)
:type 'boolean)
(defvar tramp-ssh-controlmaster-options nil
"Which ssh Control* arguments to use.
......@@ -528,8 +523,7 @@ the list by the special value `tramp-own-remote-path'."
:type '(repeat (choice
(const :tag "Default Directories" tramp-default-remote-path)
(const :tag "Private Directories" tramp-own-remote-path)
(string :tag "Directory")))
:require 'tramp)
(string :tag "Directory"))))
;;;###tramp-autoload
(defcustom tramp-remote-process-environment
......@@ -553,8 +547,7 @@ The INSIDE_EMACS environment variable will automatically be set
based on the TRAMP and Emacs versions, and should not be set here."
:group 'tramp
:version "26.1"
:type '(repeat string)
:require 'tramp)
:type '(repeat string))
;;;###tramp-autoload
(defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
......@@ -567,8 +560,7 @@ This variable is only used when Tramp needs to start up another shell
for tilde expansion. The extra arguments should typically prevent the
shell from reading its init file."
:group 'tramp
:type '(alist :key-type regexp :value-type string)
:require 'tramp)
:type '(alist :key-type regexp :value-type string))
(defconst tramp-actions-before-shell
'((tramp-login-prompt-regexp tramp-action-login)
......@@ -2481,7 +2473,9 @@ The method used must be an out-of-band method."
;; The default directory must be remote.
(let ((default-directory
(file-name-directory (if t1 filename newname)))
(process-environment (copy-sequence process-environment)))
(process-environment (copy-sequence process-environment))
;; We do not want to run timers.
timer-list timer-idle-list)
;; Set the transfer process properties.
(tramp-set-connection-property
v "process-name" (buffer-name (current-buffer)))
......@@ -2908,7 +2902,9 @@ the result will be a local, non-Tramp, file name."
;; We do not want to raise an error when
;; `start-file-process' has been started several times in
;; `eshell' and friends.
(tramp-current-connection nil)
tramp-current-connection
;; We do not want to run timers.
timer-list timer-idle-list
p)
(while (get-process name1)
......@@ -3420,7 +3416,8 @@ the result will be a local, non-Tramp, file name."
;; Set the ownership.
(when need-chown
(tramp-set-file-uid-gid filename uid gid))
(when (or (eq visit t) (null visit) (stringp visit))
(when (and (null noninteractive)
(or (eq visit t) (null visit) (stringp visit)))
(tramp-message v 0 "Wrote %s" filename))
(run-hooks 'tramp-handle-write-region-hook)))))
......@@ -4103,7 +4100,10 @@ process to set up. VEC specifies the connection."
(with-current-buffer (process-buffer proc)
;; Use MULE to select the right EOL convention for communicating
;; with the process.
(let ((cs (or (and (memq 'utf-8 (coding-system-list))
(let ((cs (or (and (memq 'utf-8-hfs (coding-system-list))
(string-match "^Darwin" uname)
(cons 'utf-8-hfs 'utf-8-hfs))
(and (memq 'utf-8 (coding-system-list))
(string-match "utf-?8" (tramp-get-remote-locale vec))
(cons 'utf-8 'utf-8))
(process-coding-system proc)
......@@ -4115,16 +4115,11 @@ process to set up. VEC specifies the connection."
cs-encode
(coding-system-change-eol-conversion
cs-encode (if (string-match "^Darwin" uname) 'mac 'unix)))
(tramp-send-command vec "echo foo ; echo bar" t)
(tramp-send-command vec "(echo foo ; echo bar)" t)
(goto-char (point-min))
(when (search-forward "\r" nil t)
(setq cs-decode (coding-system-change-eol-conversion cs-decode 'dos)))
;; Special setting for macOS.
(when (and (string-match "^Darwin" uname)
(memq 'utf-8-hfs (coding-system-list)))
(setq cs-decode 'utf-8-hfs
cs-encode 'utf-8-hfs))
(set-buffer-process-coding-system cs-decode cs-encode)
(set-process-coding-system proc cs-decode cs-encode)
(tramp-message
vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)))
......@@ -4470,13 +4465,14 @@ Goes through the list `tramp-inline-compress-commands'."
(zerop
(tramp-call-local-coding-command
(format
"echo %s | %s | %s" magic
;; Windows shells need the program file name after
;; the pipe symbol be quoted if they use forward
;; slashes as directory separators.
(if (memq system-type '(windows-nt))
"echo %s | \"%s\" | \"%s\""
"echo %s | %s | %s")
magic compress decompress)
(mapconcat
'shell-quote-argument (split-string compress) " ")
(mapconcat
'shell-quote-argument (split-string decompress) " "))
nil nil))
(throw 'next nil))
(tramp-message
......
......@@ -66,16 +66,14 @@
(defcustom tramp-smb-program "smbclient"
"Name of SMB client to run."
:group 'tramp
:type 'string
:require 'tramp)
:type 'string)
;;;###tramp-autoload
(defcustom tramp-smb-acl-program "smbcacls"
"Name of SMB acls to run."
:group 'tramp
:type 'string
:version "24.4"
:require 'tramp)
:version "24.4")
;;;###tramp-autoload
(defcustom tramp-smb-conf "/dev/null"
......@@ -83,8 +81,7 @@
If it is nil, no smb.conf will be added to the `tramp-smb-program'
call, letting the SMB client use the default one."
:group 'tramp
:type '(choice (const nil) (file :must-match t))
:require 'tramp)
:type '(choice (const nil) (file :must-match t)))
(defvar tramp-smb-version nil
"Version string of the SMB client.")
......@@ -151,6 +148,7 @@ call, letting the SMB client use the default one."
"NT_STATUS_OBJECT_NAME_NOT_FOUND"
"NT_STATUS_OBJECT_PATH_SYNTAX_BAD"
"NT_STATUS_PASSWORD_MUST_CHANGE"
"NT_STATUS_RESOURCE_NAME_NOT_FOUND"
"NT_STATUS_SHARING_VIOLATION"
"NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE"
"NT_STATUS_UNSUCCESSFUL"
......@@ -295,8 +293,7 @@ If it isn't found in the local $PATH, the absolute path of winexe
shall be given. This is needed for remote processes."
:group 'tramp
:type 'string
:version "24.3"
:require 'tramp)
:version "24.3")
;;;###tramp-autoload
(defcustom tramp-smb-winexe-shell-command "powershell.exe"
......@@ -304,8 +301,7 @@ shall be given. This is needed for remote processes."
This must be Powershell V2 compatible."
:group 'tramp
:type 'string
:version "24.3"
:require 'tramp)
:version "24.3")
;;;###tramp-autoload
(defcustom tramp-smb-winexe-shell-command-switch "-file -"
......@@ -313,8 +309,7 @@ This must be Powershell V2 compatible."
This can be used to disable echo etc."
:group 'tramp
:type 'string
:version "24.3"
:require 'tramp)
:version "24.3")
;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading.
......@@ -464,7 +459,9 @@ pass to the OPERATION."
(expand-file-name
tramp-temp-name-prefix
(tramp-compat-temporary-file-directory))))
(args (list (concat "//" host "/" share) "-E")))
(args (list (concat "//" host "/" share) "-E"))
;; We do not want to run timers.
timer-list timer-idle-list)
(if (not (zerop (length user)))
(setq args (append args (list "-U" user)))
......@@ -752,7 +749,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(let* ((share (tramp-smb-get-share v))
(localname (replace-regexp-in-string
"\\\\" "/" (tramp-smb-get-localname v)))
(args (list (concat "//" host "/" share) "-E")))
(args (list (concat "//" host "/" share) "-E"))
;; We do not want to run timers.
timer-list timer-idle-list)
(if (not (zerop (length user)))
(setq args (append args (list "-U" user)))
......@@ -1235,6 +1234,8 @@ component is used as the target of the symlink."
(let* ((name (file-name-nondirectory program))
(name1 name)
(i 0)
;; We do not want to run timers.
timer-list timer-idle-list
input tmpinput outbuf command ret)
;; Determine input.
......@@ -1417,7 +1418,9 @@ component is used as the target of the symlink."
"\\\\" "/" (tramp-smb-get-localname v)))
(args (list (concat "//" host "/" share) "-E" "-S"
(replace-regexp-in-string
"\n" "," acl-string))))
"\n" "," acl-string)))
;; We do not want to run timers.
timer-list timer-idle-list)
(if (not (zerop (length user)))
(setq args (append args (list "-U" user)))
......@@ -1497,7 +1500,9 @@ component is used as the target of the symlink."
(command (mapconcat 'identity (cons program args) " "))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name)
(i 0))
(i 0)
;; We do not want to run timers.
timer-list timer-idle-list)
(unwind-protect
(save-excursion
(save-restriction
......@@ -1589,9 +1594,18 @@ errors for shares like \"C$/\", which are common in Microsoft Windows."
(tramp-error
v 'file-error
"Buffer has changed from `%s' to `%s'" curbuf (current-buffer)))
(when (eq visit t)
(set-visited-file-modtime)))))
;; Set file modification time.
(when (or (eq visit t) (stringp visit))
(set-visited-file-modtime
(tramp-compat-file-attribute-modification-time
(file-attributes filename))))
;; The end.
(when (and (null noninteractive)
(or (eq visit t) (null visit) (stringp visit)))
(tramp-message v 0 "Wrote %s" filename))
(run-hooks 'tramp-handle-write-region-hook))))
;; Internal file name functions.
......
......@@ -79,8 +79,7 @@
"Whether Tramp is enabled.
If it is set to nil, all remote file names are used literally."
:group 'tramp
:type 'boolean
:require 'tramp)
:type 'boolean)
(defcustom tramp-verbose 3
"Verbosity level for Tramp messages.
......@@ -98,8 +97,7 @@ Any level x includes messages for all levels 1 .. x-1. The levels are
9 test commands
10 traces (huge)."
:group 'tramp
:type 'integer
:require 'tramp)
:type 'integer)
(defcustom tramp-backup-directory-alist nil
"Alist of filename patterns and backup directory names.
......@@ -114,8 +112,7 @@ gives the same backup policy for Tramp files on their hosts like the
policy for local files."
:group 'tramp
:type '(repeat (cons (regexp :tag "Regexp matching filename")
(directory :tag "Backup directory name")))
:require 'tramp)
(directory :tag "Backup directory name"))))
(defcustom tramp-auto-save-directory nil
"Put auto-save files in this directory, if set.
......@@ -123,8 +120,7 @@ The idea is to use a local directory so that auto-saving is faster.
This setting has precedence over `auto-save-file-name-transforms'."
:group 'tramp
:type '(choice (const :tag "Use default" nil)
(directory :tag "Auto save directory name"))
:require 'tramp)
(directory :tag "Auto save directory name")))
(defcustom tramp-encoding-shell
(or (tramp-compat-funcall 'w32-shell-name) "/bin/sh")
......@@ -148,16 +144,14 @@ Note that this variable is not used for remote commands. There are
mechanisms in tramp.el which automatically determine the right shell to
use for the remote host."
:group 'tramp
:type '(file :must-match t)
:require 'tramp)
:type '(file :must-match t))
(defcustom tramp-encoding-command-switch
(if (tramp-compat-funcall 'w32-shell-dos-semantics) "/c" "-c")
"Use this switch together with `tramp-encoding-shell' for local commands.
See the variable `tramp-encoding-shell' for more information."
:group 'tramp
:type 'string
:require 'tramp)
:type 'string)
(defcustom tramp-encoding-command-interactive
(unless (tramp-compat-funcall 'w32-shell-dos-semantics) "-i")
......@@ -165,8 +159,7 @@ See the variable `tramp-encoding-shell' for more information."
See the variable `tramp-encoding-shell' for more information."
:version "24.1"
:group 'tramp
:type '(choice (const nil) string)
:require 'tramp)
:type '(choice (const nil) string))
;;;###tramp-autoload
(defvar tramp-methods nil
......@@ -309,8 +302,7 @@ useful only in combination with `tramp-default-proxies-alist'.")
See `tramp-methods' for possibilities.
Also see `tramp-default-method-alist'."
:group 'tramp
:type 'string
:require 'tramp)
:type 'string)
;;;###tramp-autoload
(defcustom tramp-default-method-alist nil
......@@ -328,8 +320,7 @@ See `tramp-methods' for a list of possibilities for METHOD."
:group 'tramp
:type '(repeat (list (choice :tag "Host regexp" regexp sexp)
(choice :tag "User regexp" regexp sexp)
(choice :tag "Method name" string (const nil))))
:require 'tramp)
(choice :tag "Method name" string (const nil)))))
(defconst tramp-default-method-marker "-"
"Marker for default method in remote file names.")
......@@ -341,15 +332,14 @@ It is nil by default; otherwise settings in configuration files like
This variable is regarded as obsolete, and will be removed soon."
:group 'tramp
:type '(choice (const nil) string)
:require 'tramp)
:type '(choice (const nil) string))
;;;###tramp-autoload
(defcustom tramp-default-user-alist nil
"Default user to use for specific method/host pairs.
This is an alist of items (METHOD HOST USER). The first matching item
specifies the user to use for a file name which does not specify a
user. METHOD and USER are regular expressions or nil, which is
user. METHOD and HOST are regular expressions or nil, which is
interpreted as a regular expression which always matches. If no entry
matches, the variable `tramp-default-user' takes effect.
......@@ -358,22 +348,20 @@ empty string for the method name."
:group 'tramp
:type '(repeat (list (choice :tag "Method regexp" regexp sexp)
(choice :tag " Host regexp" regexp sexp)
(choice :tag " User name" string (const nil))))
:require 'tramp)
(choice :tag " User name" string (const nil)))))
(defcustom tramp-default-host (system-name)
"Default host to use for transferring files.
Useful for su and sudo methods mostly."
:group 'tramp
:type 'string
:require 'tramp)
:type 'string)
;;;###tramp-autoload
(defcustom tramp-default-host-alist nil
"Default host to use for specific method/user pairs.
This is an alist of items (METHOD USER HOST). The first matching item
specifies the host to use for a file name which does not specify a
host. METHOD and HOST are regular expressions or nil, which is
host. METHOD and USER are regular expressions or nil, which is
interpreted as a regular expression which always matches. If no entry
matches, the variable `tramp-default-host' takes effect.
......@@ -383,8 +371,7 @@ empty string for the method name."
:version "24.4"
:type '(repeat (list (choice :tag "Method regexp" regexp sexp)
(choice :tag " User regexp" regexp sexp)
(choice :tag " Host name" string (const nil))))
:require 'tramp)
(choice :tag " Host name" string (const nil)))))
(defcustom tramp-default-proxies-alist nil
"Route to be followed for specific host/user pairs.
......@@ -403,15 +390,13 @@ interpreted as a regular expression which always matches."
:group 'tramp
:type '(repeat (list (choice :tag "Host regexp" regexp sexp)
(choice :tag "User regexp" regexp sexp)
(choice :tag " Proxy name" string (const nil))))
:require 'tramp)
(choice :tag " Proxy name" string (const nil)))))
(defcustom tramp-save-ad-hoc-proxies nil
"Whether to save ad-hoc proxies persistently."
:group 'tramp
:version "24.3"
:type 'boolean
:require 'tramp)
:type 'boolean)
(defcustom tramp-restricted-shell-hosts-alist
(when (memq system-type '(windows-nt))
......@@ -423,8 +408,7 @@ proxies only, see `tramp-default-proxies-alist'. If the local
host runs a registered shell, it shall be added to this list, too."
:version "24.3"
:group 'tramp
:type '(repeat (regexp :tag "Host regexp"))
:require 'tramp)
:type '(repeat (regexp :tag "Host regexp")))
;;;###tramp-autoload
(defconst tramp-local-host-regexp
......@@ -485,16 +469,14 @@ the remote shell.")
"String used for end of line in local processes."
:version "24.1"
:group 'tramp
:type 'string
:require 'tramp)
:type 'string)
(defcustom tramp-rsh-end-of-line "\n"
"String used for end of line in rsh connections.
I don't think this ever needs to be changed, so please tell me about it
if you need to change this."
:group 'tramp
:type 'string
:require 'tramp)
:type 'string)
(defcustom tramp-login-prompt-regexp
".*\\(user\\|login\\)\\( .*\\)?: *"
......@@ -503,8 +485,7 @@ The regexp should match at end of buffer.
Sometimes the prompt is reported to look like \"login as:\"."
:group 'tramp
:type 'regexp
:require 'tramp)
:type 'regexp)
(defcustom tramp-shell-prompt-pattern
;; Allow a prompt to start right after a ^M since it indeed would be
......@@ -526,8 +507,7 @@ which should work well in many cases.
This regexp must match both `tramp-initial-end-of-output' and
`tramp-end-of-output'."
:group 'tramp
:type 'regexp
:require 'tramp)
:type 'regexp)
(defcustom tramp-password-prompt-regexp
(format "^.*\\(%s\\).*:\^@? *"
......@@ -540,8 +520,7 @@ The regexp should match at end of buffer.
The `sudo' program appears to insert a `^@' character into the prompt."
:version "24.4"
:group 'tramp
:type 'regexp
:require 'tramp)
:type 'regexp)
(defcustom tramp-wrong-passwd-regexp
(concat "^.*"
......@@ -566,8 +545,7 @@ The `sudo' program appears to insert a `^@' character into the prompt."
"Regexp matching a `login failed' message.
The regexp should match at end of buffer."
:group 'tramp
:type 'regexp
:require 'tramp)
:type 'regexp)
(defcustom tramp-yesno-prompt-regexp