:set (lambda (symbol value)
;; Check allowed values.
(unless (memq value (tramp-syntax-values))
- (user-error "Wrong `tramp-syntax' %s" tramp-syntax))
+ (tramp-compat-user-error "Wrong `tramp-syntax' %s" tramp-syntax))
;; Cleanup existing buffers.
(unless (eq (symbol-value symbol) value)
(tramp-cleanup-all-buffers))
(add-to-list 'file-name-handler-alist
(cons tramp-initial-file-name-regexp 'tramp-file-name-handler))
(put 'tramp-file-name-handler 'safe-magic t)
- ;; Mark `operations' the handler is responsible for. It's a short list ...
- (put 'tramp-file-name-handler 'operations
- '(file-name-all-completions file-name-completion file-remote-p))
(add-to-list 'file-name-handler-alist
(cons tramp-initial-completion-file-name-regexp
;; Remove autoloaded handlers from file name handler alist. Useful,
;; if `tramp-syntax' has been changed.
(dolist (fnh '(tramp-file-name-handler
- tramp-completion-file-name-handler))
+ tramp-completion-file-name-handler
+ ;; This is autoloaded in Emacs 24 & 25.
+ tramp-autoload-file-name-handler))
(let ((a1 (rassq fnh file-name-handler-alist)))
(setq file-name-handler-alist (delq a1 file-name-handler-alist))))
;; Mark `operations' the handler is responsible for.
(put 'tramp-file-name-handler
'operations
- (cl-delete-duplicates
+ (delete-dups
(append
(get 'tramp-file-name-handler 'operations)
(mapcar