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'."
|
||||
:group 'tramp
|
||||
:version "26.1"
|
||||
:package-version '(Tramp . "2.3.2")
|
||||
:package-version '(Tramp . "2.3.3")
|
||||
:type '(choice (const :tag "Default" default)
|
||||
(const :tag "Ange-FTP" simplified)
|
||||
(const :tag "XEmacs" separate))
|
||||
:require 'tramp
|
||||
: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.
|
||||
(unless (memq value (tramp-syntax-values))
|
||||
(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-build-completion-file-name-regexp)))
|
||||
;; Rearrange file name handlers.
|
||||
(tramp-register-file-name-handlers)))
|
||||
(tramp-register-file-name-handlers))
|
||||
|
||||
;; Initialize the Tramp syntax variables. We want to override initial
|
||||
;; values of `tramp-file-name-regexp' and
|
||||
;; `tramp-completion-file-name-regexp'.
|
||||
;; value of `tramp-file-name-regexp'. Other Tramp syntax variables
|
||||
;; 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
|
||||
'(custom-set-variables `(tramp-syntax ',(tramp-compat-tramp-syntax))))
|
||||
'(tramp-set-syntax 'tramp-syntax (tramp-compat-tramp-syntax)))
|
||||
|
||||
(defun tramp-syntax-values ()
|
||||
"Return possible values of `tramp-syntax', a list"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue