mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
; Tramp code cleanup
* lisp/net/tramp-cache.el (tramp-cache-unload-hook): * lisp/net/tramp-cmds.el (tramp-enable-method, tramp-bug): * lisp/net/tramp-compat.el: * test/lisp/net/tramp-tests.el (tramp-test26-interactive-file-name-completion): Simplify retrieving proper function symbols.
This commit is contained in:
parent
6762394734
commit
17c78c9920
4 changed files with 8 additions and 13 deletions
|
|
@ -202,11 +202,6 @@ Return DEFAULT if not set."
|
|||
(set var (1+ val))))
|
||||
value)))
|
||||
|
||||
(add-hook 'tramp-cache-unload-hook
|
||||
(lambda ()
|
||||
(dolist (var (all-completions "tramp-cache-get-count-" obarray))
|
||||
(unintern var obarray))))
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defun tramp-set-file-property (key file property value)
|
||||
"Set the PROPERTY of FILE to VALUE, in the cache context of KEY.
|
||||
|
|
@ -229,8 +224,9 @@ Return VALUE."
|
|||
|
||||
(add-hook 'tramp-cache-unload-hook
|
||||
(lambda ()
|
||||
(dolist (var (all-completions "tramp-cache-set-count-" obarray))
|
||||
(unintern var obarray))))
|
||||
(dolist (var (apropos-internal
|
||||
(rx bos "tramp-cache-" (| "get" "set") "-count-")))
|
||||
(unintern var nil))))
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defun tramp-file-property-p (key file property)
|
||||
|
|
|
|||
|
|
@ -78,8 +78,7 @@ SYNTAX can be one of the symbols `default' (default),
|
|||
((not (assoc method tramp-methods))))
|
||||
method))
|
||||
;; All method enabling functions.
|
||||
(mapcar
|
||||
#'intern (all-completions "tramp-enable-" obarray #'functionp))))))
|
||||
(apropos-internal (rx bos "tramp-enable-") #'functionp)))))
|
||||
|
||||
(when-let* (((not (assoc method tramp-methods)))
|
||||
(fn (intern (format "tramp-enable-%s-method" method)))
|
||||
|
|
@ -839,7 +838,7 @@ This is needed if there are compatibility problems."
|
|||
(and x (boundp x) (not (get x 'tramp-suppress-trace))
|
||||
(cons x 'tramp-reporter-dump-variable)))
|
||||
(append
|
||||
(mapcar #'intern (all-completions "tramp-" obarray #'boundp))
|
||||
(apropos-internal (rx bos "tramp-") #'boundp)
|
||||
;; Non-Tramp variables of interest.
|
||||
'(shell-prompt-pattern
|
||||
backup-by-copying
|
||||
|
|
|
|||
|
|
@ -229,8 +229,8 @@ value is the default binding of the variable."
|
|||
(cdr result)
|
||||
,variable)))))
|
||||
|
||||
(dolist (elt (all-completions "tramp-compat-" obarray #'functionp))
|
||||
(function-put (intern elt) 'tramp-suppress-trace t))
|
||||
(dolist (elt (apropos-internal (rx bos "tramp-compat-") #'functionp))
|
||||
(function-put elt 'tramp-suppress-trace t))
|
||||
|
||||
(add-hook 'tramp-unload-hook
|
||||
(lambda ()
|
||||
|
|
|
|||
|
|
@ -5060,7 +5060,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
|
|||
(dolist
|
||||
(elt
|
||||
(append
|
||||
(mapcar #'intern (all-completions "tramp-" obarray #'functionp))
|
||||
(apropos-internal (rx bos "tramp-") #'functionp)
|
||||
'(completion-file-name-table read-file-name)))
|
||||
(unless (get elt 'tramp-suppress-trace)
|
||||
(trace-function-background elt))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue