summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2018-05-24 14:32:12 +0200
committerMichael Albinus <michael.albinus@gmx.de>2018-05-24 14:32:12 +0200
commit5444cb5f6867d43d1c21f30949e2002d8450cbc2 (patch)
tree692efbefda0b1c40be944fe273a5d1c3bcffd8c9
parent6f037f427a25160168e842bff0d12b816d69067d (diff)
downloademacs-5444cb5f6867d43d1c21f30949e2002d8450cbc2.tar.gz
Fix Bug#31558
* 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-host-regexp, 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-ignored-file-name-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-ignored-file-name-regexp): Use type regexp.
-rw-r--r--lisp/net/tramp-adb.el9
-rw-r--r--lisp/net/tramp-cache.el6
-rw-r--r--lisp/net/tramp-gvfs.el9
-rw-r--r--lisp/net/tramp-sh.el24
-rw-r--r--lisp/net/tramp-smb.el18
-rw-r--r--lisp/net/tramp.el105
6 files changed, 57 insertions, 114 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index f8edb27c516..df2160770b1 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -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:]]"
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 97c687598f2..b40a4d7edd6 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -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.")
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index a9a1a6085a4..ac250818aca 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -143,8 +143,7 @@
(const "owncloud")
(const "sftp")
(const "smb")
- (const "synce")))
- :require 'tramp)
+ (const "synce"))))
(defconst tramp-goa-methods '("gdrive" "owncloud")
"List of methods which require registration at GNOME Online Accounts.")
@@ -171,8 +170,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.
@@ -569,8 +567,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.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 9ea23a4edb5..227fd9c356d 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -48,8 +48,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
@@ -57,8 +56,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"
@@ -67,8 +65,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"
@@ -85,8 +82,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"
@@ -120,8 +116,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)
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index a4d0d53bf70..c2df2e21bcb 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -67,16 +67,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"
@@ -84,8 +82,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.")
@@ -300,8 +297,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"
@@ -309,8 +305,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 -"
@@ -318,8 +313,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.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 499fcadffff..cc3130e2122 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -80,8 +80,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.
@@ -99,8 +98,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.
@@ -115,8 +113,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.
@@ -124,8 +121,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")
@@ -149,16 +145,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")
@@ -166,8 +160,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
@@ -310,8 +303,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
@@ -329,8 +321,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.")
@@ -342,8 +333,7 @@ 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
@@ -359,15 +349,13 @@ 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
@@ -384,8 +372,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.
@@ -404,15 +391,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))
@@ -424,8 +409,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
(defcustom tramp-local-host-regexp
@@ -439,8 +423,7 @@ If the local host runs a chrooted environment, set this to nil."
:version "27.1"
:group 'tramp
:type '(choice (const :tag "Chrooted environment" nil)
- (regexp :tag "Host regexp"))
- :require 'tramp)
+ (regexp :tag "Host regexp")))
(defvar tramp-completion-function-alist nil
"Alist of methods for remote files.
@@ -492,16 +475,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\\)\\( .*\\)?: *"
@@ -510,8 +491,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
@@ -533,8 +513,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\\).*:\^@? *"
@@ -547,8 +526,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 "^.*"
@@ -573,8 +551,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
(concat
@@ -585,8 +562,7 @@ 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
- :require 'tramp)
+ :type 'regexp)
(defcustom tramp-yn-prompt-regexp
(concat
@@ -599,8 +575,7 @@ 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
- :require 'tramp)
+ :type 'regexp)
(defcustom tramp-terminal-prompt-regexp
(concat "\\("
@@ -612,8 +587,7 @@ 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
- :require 'tramp)
+ :type 'regexp)
(defcustom tramp-operation-not-permitted-regexp
(concat "\\(" "preserving times.*" "\\|" "set mode" "\\)" ":\\s-*"
@@ -622,8 +596,7 @@ 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
- :require 'tramp)
+ :type 'regexp)
(defcustom tramp-copy-failed-regexp
(concat "\\(.+: "
@@ -635,8 +608,7 @@ be ignored safely."
"\\)\\s-*")
"Regular expression matching copy problems in (s)cp operations."
:group 'tramp
- :type 'regexp
- :require 'tramp)
+ :type 'regexp)
(defcustom tramp-process-alive-regexp
""
@@ -646,8 +618,7 @@ 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
- :require 'tramp)
+ :type 'regexp)
(defconst tramp-temp-name-prefix "tramp."
"Prefix to use for temporary files.
@@ -996,8 +967,7 @@ initial value is overwritten by the car of `tramp-file-name-structure'.")
"Regular expression matching file names that are not under Tramp’s control."
:version "27.1"
:group 'tramp
- :type '(choice (const nil) string)
- :require 'tramp)
+ :type '(choice (const nil) regexp))
(defconst tramp-completion-file-name-regexp-default
(concat
@@ -1142,8 +1112,7 @@ 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)
- :require 'tramp)
+ :type '(choice (const nil) integer))
;; Logging in to a remote host normally requires obtaining a pty. But
;; Emacs on macOS has process-connection-type set to nil by default,
@@ -1154,8 +1123,7 @@ 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))
- :require 'tramp)
+ :type '(choice (const nil) (const t) (const pty)))
(defcustom tramp-connection-timeout 60
"Defines the max time to wait for establishing a connection (in seconds).
@@ -1164,8 +1132,7 @@ 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
- :require 'tramp)
+ :type 'integer)
(defcustom tramp-connection-min-time-diff 5
"Defines seconds between two consecutive connection attempts.
@@ -1179,8 +1146,7 @@ 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)
- :require 'tramp)
+ :type '(choice (const nil) integer))
(defcustom tramp-completion-reread-directory-timeout 10
"Defines seconds since last remote command before rereading a directory.
@@ -1192,8 +1158,7 @@ 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)
- :require 'tramp)
+ :type '(choice (const nil) (const t) integer))
;;; Internal Variables: