Further work on Bug#28889
* lisp/net/tramp.el (tramp-set-syntax): New defun. (tramp-syntax): Use it. Change :package-version. (Bug#28889)
This commit is contained in:
parent
c6deabaf4d
commit
529a9c09d3
1 changed files with 40 additions and 34 deletions
|
@ -674,13 +674,18 @@ Do not change the value by `setq', it must be changed only by
|
||||||
`custom-set-variables'. See also `tramp-change-syntax'."
|
`custom-set-variables'. See also `tramp-change-syntax'."
|
||||||
:group 'tramp
|
:group 'tramp
|
||||||
:version "26.1"
|
:version "26.1"
|
||||||
:package-version '(Tramp . "2.3.2")
|
:package-version '(Tramp . "2.3.3")
|
||||||
:type '(choice (const :tag "Default" default)
|
:type '(choice (const :tag "Default" default)
|
||||||
(const :tag "Ange-FTP" simplified)
|
(const :tag "Ange-FTP" simplified)
|
||||||
(const :tag "XEmacs" separate))
|
(const :tag "XEmacs" separate))
|
||||||
:require 'tramp
|
:require 'tramp
|
||||||
:initialize 'custom-initialize-set
|
:initialize 'custom-initialize-set
|
||||||
:set (lambda (symbol value)
|
:set 'tramp-set-syntax)
|
||||||
|
|
||||||
|
(defun tramp-set-syntax (symbol value)
|
||||||
|
"Set SYMBOL to value VALUE.
|
||||||
|
Used in user option `tramp-syntax'. There are further variables
|
||||||
|
to be set, depending on VALUE."
|
||||||
;; Check allowed values.
|
;; Check allowed values.
|
||||||
(unless (memq value (tramp-syntax-values))
|
(unless (memq value (tramp-syntax-values))
|
||||||
(tramp-compat-user-error "Wrong `tramp-syntax' %s" tramp-syntax))
|
(tramp-compat-user-error "Wrong `tramp-syntax' %s" tramp-syntax))
|
||||||
|
@ -709,13 +714,14 @@ Do not change the value by `setq', it must be changed only by
|
||||||
tramp-completion-file-name-regexp
|
tramp-completion-file-name-regexp
|
||||||
(tramp-build-completion-file-name-regexp)))
|
(tramp-build-completion-file-name-regexp)))
|
||||||
;; Rearrange file name handlers.
|
;; Rearrange file name handlers.
|
||||||
(tramp-register-file-name-handlers)))
|
(tramp-register-file-name-handlers))
|
||||||
|
|
||||||
;; Initialize the Tramp syntax variables. We want to override initial
|
;; Initialize the Tramp syntax variables. We want to override initial
|
||||||
;; values of `tramp-file-name-regexp' and
|
;; value of `tramp-file-name-regexp'. Other Tramp syntax variables
|
||||||
;; `tramp-completion-file-name-regexp'.
|
;; must be initialized as well to proper values. We do not call
|
||||||
|
;; `custom-set-variable', this would load Tramp via custom.el.
|
||||||
(eval-after-load 'tramp
|
(eval-after-load 'tramp
|
||||||
'(custom-set-variables `(tramp-syntax ',(tramp-compat-tramp-syntax))))
|
'(tramp-set-syntax 'tramp-syntax (tramp-compat-tramp-syntax)))
|
||||||
|
|
||||||
(defun tramp-syntax-values ()
|
(defun tramp-syntax-values ()
|
||||||
"Return possible values of `tramp-syntax', a list"
|
"Return possible values of `tramp-syntax', a list"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue