Commit 59720dc1 authored by Michael Albinus's avatar Michael Albinus

Improve handling of defcustoms in tramp

* doc/misc/tramp.texi: Protect all multi-line examples by
@group ... @end group.  Use proper `custom-set-variables'
examples.  Use consequently @option for user options.  Remove
superfluous @cindex and @vindex entries.
(Top): Remove reference to outdated mail archives.
(Configuration): Tune references.
(Default Method): Make `tramp-default-method' and
`tramp-default-method-alist' a @defopt.
(Default User): Make `tramp-default-user' and
`tramp-default-user-alist' a @defopt.
(Default Host): Make `tramp-default-host' and
`tramp-default-host-alist' a @defopt.

* 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-syntax, 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): Add :require 'tramp.
parent 66ae4cad
This diff is collapsed.
......@@ -40,7 +40,8 @@
"Name of the Android Debug Bridge program."
:group 'tramp
:version "24.4"
:type 'string)
:type 'string
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-adb-connect-if-not-connected nil
......@@ -48,7 +49,8 @@
It is used for TCP/IP devices."
:group 'tramp
:version "25.1"
:type 'boolean)
:type 'boolean
:require 'tramp)
;;;###tramp-autoload
(defconst tramp-adb-method "adb"
......@@ -60,7 +62,8 @@ It is used for TCP/IP devices."
"Regexp used as prompt in almquist shell."
:type 'string
:version "24.4"
:group 'tramp)
:group 'tramp
:require '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:]]"
......
......@@ -72,13 +72,16 @@ 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))))
(choice :tag " Value" sexp)))
:require 'tramp)
;;;###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)
:type 'file
:require 'tramp)
(defvar tramp-cache-data-changed nil
"Whether persistent cache data have been changed.")
......
......@@ -123,7 +123,8 @@
(const "obex")
(const "sftp")
(const "smb")
(const "synce"))))
(const "synce")))
:require 'tramp)
;; Add defaults for `tramp-default-user-alist' and `tramp-default-host-alist'.
;;;###tramp-autoload
......@@ -141,7 +142,8 @@
"Zeroconf domain to be used for discovering services, like host names."
:group 'tramp
:version "23.2"
:type 'string)
:type 'string
:require 'tramp)
;; Add the methods to `tramp-methods', in order to allow minibuffer
;; completion.
......@@ -393,7 +395,8 @@ completion, nil means to use always cached values for discovered
devices."
:group 'tramp
:version "23.2"
:type '(choice (const nil) integer))
:type '(choice (const nil) integer)
:require 'tramp)
(defvar tramp-bluez-discovery nil
"Indicator for a running bluetooth device discovery.
......
......@@ -46,7 +46,8 @@ 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))
:type '(choice (const nil) integer)
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-copy-size-limit 10240
......@@ -54,7 +55,8 @@ 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))
:type '(choice (const nil) integer)
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-terminal-type "dumb"
......@@ -63,7 +65,8 @@ 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)
:type 'string
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-histfile-override ".tramp_history"
......@@ -81,7 +84,8 @@ e.g. \"$HOME/.sh_history\"."
:version "25.1"
:type '(choice (const :tag "Do not override HISTFILE" nil)
(const :tag "Unset HISTFILE" t)
(string :tag "Redirect to a file")))
(string :tag "Redirect to a file"))
:require 'tramp)
;;;###tramp-autoload
(defconst tramp-display-escape-sequence-regexp "\e[[;0-9]+m"
......@@ -115,7 +119,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
"Whether to use `tramp-ssh-controlmaster-options'."
:group 'tramp
:version "24.4"
:type 'boolean)
:type 'boolean
:require 'tramp)
(defvar tramp-ssh-controlmaster-options nil
"Which ssh Control* arguments to use.
......@@ -542,7 +547,8 @@ 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"))))
(string :tag "Directory")))
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-remote-process-environment
......@@ -561,7 +567,8 @@ Special handling is applied to the PATH environment, which should
not be set here. Instead, it should be set via `tramp-remote-path'."
:group 'tramp
:version "25.2"
:type '(repeat string))
:type '(repeat string)
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
......@@ -578,7 +585,8 @@ shell from reading its init file."
;; `alist' is available. Who knows the right way to test it?
:type (if (get 'alist 'widget-type)
'(alist :key-type string :value-type string)
'(repeat (cons string string))))
'(repeat (cons string string)))
:require 'tramp)
(defconst tramp-actions-before-shell
'((tramp-login-prompt-regexp tramp-action-login)
......
......@@ -74,14 +74,16 @@
(defcustom tramp-smb-program "smbclient"
"Name of SMB client to run."
:group 'tramp
:type 'string)
:type 'string
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-smb-acl-program "smbcacls"
"Name of SMB acls to run."
:group 'tramp
:type 'string
:version "24.4")
:version "24.4"
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-smb-conf "/dev/null"
......@@ -89,7 +91,8 @@
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)))
:type '(choice (const nil) (file :must-match t))
:require 'tramp)
(defvar tramp-smb-version nil
"Version string of the SMB client.")
......@@ -293,7 +296,8 @@ 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")
:version "24.3"
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-smb-winexe-shell-command "powershell.exe"
......@@ -301,7 +305,8 @@ shall be given. This is needed for remote processes."
This must be Powershell V2 compatible."
:group 'tramp
:type 'string
:version "24.3")
:version "24.3"
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-smb-winexe-shell-command-switch "-file -"
......@@ -309,7 +314,8 @@ This must be Powershell V2 compatible."
This can be used to disable echo etc."
:group 'tramp
:type 'string
:version "24.3")
:version "24.3"
:require 'tramp)
;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el. Otherwise, there would be recursive autoloading.
......
......@@ -76,7 +76,8 @@
"Whether Tramp is enabled.
If it is set to nil, all remote file names are used literally."
:group 'tramp
:type 'boolean)
:type 'boolean
:require 'tramp)
(defcustom tramp-verbose 3
"Verbosity level for Tramp messages.
......@@ -94,7 +95,8 @@ Any level x includes messages for all levels 1 .. x-1. The levels are
9 test commands
10 traces (huge)."
:group 'tramp
:type 'integer)
:type 'integer
:require 'tramp)
(defcustom tramp-backup-directory-alist nil
"Alist of filename patterns and backup directory names.
......@@ -109,7 +111,8 @@ 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"))))
(directory :tag "Backup directory name")))
:require 'tramp)
(defcustom tramp-auto-save-directory nil
"Put auto-save files in this directory, if set.
......@@ -117,7 +120,8 @@ 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")))
(directory :tag "Auto save directory name"))
:require 'tramp)
(defcustom tramp-encoding-shell
(or (tramp-compat-funcall 'w32-shell-name) "/bin/sh")
......@@ -141,14 +145,16 @@ 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))
:type '(file :must-match t)
:require 'tramp)
(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)
:type 'string
:require 'tramp)
(defcustom tramp-encoding-command-interactive
(unless (tramp-compat-funcall 'w32-shell-dos-semantics) "-i")
......@@ -156,7 +162,8 @@ 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))
:type '(choice (const nil) string)
:require 'tramp)
;;;###tramp-autoload
(defvar tramp-methods nil
......@@ -300,7 +307,8 @@ useful only in combination with `tramp-default-proxies-alist'.")
See `tramp-methods' for possibilities.
Also see `tramp-default-method-alist'."
:group 'tramp
:type 'string)
:type 'string
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-default-method-alist nil
......@@ -318,7 +326,8 @@ 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)))))
(choice :tag "Method name" string (const nil))))
:require 'tramp)
(defcustom tramp-default-user nil
"Default user to use for transferring files.
......@@ -327,7 +336,8 @@ 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))
:type '(choice (const nil) string)
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-default-user-alist nil
......@@ -343,13 +353,15 @@ 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)))))
(choice :tag " User name" string (const nil))))
:require 'tramp)
(defcustom tramp-default-host (system-name)
"Default host to use for transferring files.
Useful for su and sudo methods mostly."
:group 'tramp
:type 'string)
:type 'string
:require 'tramp)
;;;###tramp-autoload
(defcustom tramp-default-host-alist nil
......@@ -366,7 +378,8 @@ 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)))))
(choice :tag " Host name" string (const nil))))
:require 'tramp)
(defcustom tramp-default-proxies-alist nil
"Route to be followed for specific host/user pairs.
......@@ -385,13 +398,15 @@ 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)))))
(choice :tag " Proxy name" string (const nil))))
:require 'tramp)
(defcustom tramp-save-ad-hoc-proxies nil
"Whether to save ad-hoc proxies persistently."
:group 'tramp
:version "24.3"
:type 'boolean)
:type 'boolean
:require 'tramp)
(defcustom tramp-restricted-shell-hosts-alist
(when (memq system-type '(windows-nt))
......@@ -403,7 +418,8 @@ 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")))
:type '(repeat (regexp :tag "Host regexp"))
:require 'tramp)
;;;###tramp-autoload
(defconst tramp-local-host-regexp
......@@ -464,14 +480,16 @@ the remote shell.")
"String used for end of line in local processes."
:version "24.1"
:group 'tramp
:type 'string)
:type 'string
:require 'tramp)
(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)
:type 'string
:require 'tramp)
(defcustom tramp-login-prompt-regexp
".*\\(user\\|login\\)\\( .*\\)?: *"
......@@ -480,7 +498,8 @@ The regexp should match at end of buffer.
Sometimes the prompt is reported to look like \"login as:\"."
:group 'tramp
:type 'regexp)
:type 'regexp
:require 'tramp)
(defcustom tramp-shell-prompt-pattern
;; Allow a prompt to start right after a ^M since it indeed would be
......@@ -502,7 +521,8 @@ 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)
:type 'regexp
:require 'tramp)
(defcustom tramp-password-prompt-regexp
(format "^.*\\(%s\\).*:\^@? *"
......@@ -516,7 +536,8 @@ 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)
:type 'regexp
:require 'tramp)
(defcustom tramp-wrong-passwd-regexp
(concat "^.*"
......@@ -540,7 +561,8 @@ 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)
:type 'regexp
:require 'tramp)
(defcustom tramp-yesno-prompt-regexp
(concat
......@@ -551,19 +573,22 @@ The confirmation should be done with yes or no.
The regexp should match at end of buffer.
See also `tramp-yn-prompt-regexp'."
:group 'tramp
:type 'regexp)
:type 'regexp
:require 'tramp)
(defcustom tramp-yn-prompt-regexp
(concat
(regexp-opt '("Store key in cache? (y/n)"
"Update cached key? (y/n, Return cancels connection)") t)
"Update cached key? (y/n, Return cancels connection)")
t)
"\\s-*")
"Regular expression matching all y/n queries which need to be confirmed.
The confirmation should be done with y or n.
The regexp should match at end of buffer.
See also `tramp-yesno-prompt-regexp'."
:group 'tramp
:type 'regexp)
:type 'regexp
:require 'tramp)
(defcustom tramp-terminal-prompt-regexp
(concat "\\("
......@@ -575,7 +600,8 @@ See also `tramp-yesno-prompt-regexp'."
The regexp should match at end of buffer.
The answer will be provided by `tramp-action-terminal', which see."
:group 'tramp
:type 'regexp)
:type 'regexp
:require 'tramp)
(defcustom tramp-operation-not-permitted-regexp
(concat "\\(" "preserving times.*" "\\|" "set mode" "\\)" ":\\s-*"
......@@ -584,18 +610,21 @@ The answer will be provided by `tramp-action-terminal', which see."
Copying has been performed successfully already, so this message can
be ignored safely."
:group 'tramp
:type 'regexp)
:type 'regexp
:require 'tramp)
(defcustom tramp-copy-failed-regexp
(concat "\\(.+: "
(regexp-opt '("Permission denied"
"not a regular file"
"is a directory"
"No such file or directory") t)
"No such file or directory")
t)
"\\)\\s-*")
"Regular expression matching copy problems in (s)cp operations."
:group 'tramp
:type 'regexp)
:type 'regexp
:require 'tramp)
(defcustom tramp-process-alive-regexp
""
......@@ -605,7 +634,8 @@ check regularly the status of the associated process.
The answer will be provided by `tramp-action-process-alive',
`tramp-action-out-of-band', which see."
:group 'tramp
:type 'regexp)
:type 'regexp
:require 'tramp)
(defconst tramp-temp-name-prefix "tramp."
"Prefix to use for temporary files.
......@@ -636,7 +666,8 @@ It can have the following values:
:group 'tramp
:version "24.4"
:type '(choice (const :tag "Ange-FTP" ftp)
(const :tag "XEmacs" sep)))
(const :tag "XEmacs" sep))
:require 'tramp)
(defconst tramp-prefix-format
(cond ((equal tramp-syntax 'ftp) "/")
......@@ -951,7 +982,8 @@ in the third line of the code.
Please raise a bug report via \"M-x tramp-bug\" if your system needs
this variable to be set as well."
:group 'tramp
:type '(choice (const nil) integer))
:type '(choice (const nil) integer)
:require 'tramp)
;; Logging in to a remote host normally requires obtaining a pty. But
;; Emacs on MacOS X has process-connection-type set to nil by default,
......@@ -962,7 +994,8 @@ this variable to be set as well."
Tramp binds `process-connection-type' to the value given here before
opening a connection to a remote host."
:group 'tramp
:type '(choice (const nil) (const t) (const pty)))
:type '(choice (const nil) (const t) (const pty))
:require 'tramp)
(defcustom tramp-connection-timeout 60
"Defines the max time to wait for establishing a connection (in seconds).
......@@ -971,7 +1004,8 @@ This can be overwritten for different connection types in `tramp-methods'.
The timeout does not include the time reading a password."
:group 'tramp
:version "24.4"
:type 'integer)
:type 'integer
:require 'tramp)
(defcustom tramp-connection-min-time-diff 5
"Defines seconds between two consecutive connection attempts.
......@@ -985,7 +1019,8 @@ in a short time frame. In those cases it is recommended to
let-bind this variable."
:group 'tramp
:version "24.4"
:type '(choice (const nil) integer))
:type '(choice (const nil) integer)
:require 'tramp)
(defcustom tramp-completion-reread-directory-timeout 10
"Defines seconds since last remote command before rereading a directory.
......@@ -997,7 +1032,8 @@ have been gone since last remote command execution. A value of t
would require an immediate reread during filename completion, nil
means to use always cached values for the directory contents."
:group 'tramp
:type '(choice (const nil) (const t) integer))
:type '(choice (const nil) (const t) integer)
:require 'tramp)
;;; Internal Variables:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment