If it doesn't exist yet, it is created and initialized with
matching entries of `tramp-connection-properties'.
If KEY is `tramp-cache-undefined', don't create anything, and return nil."
- (declare (tramp-suppress-trace t))
+ ;; (declare (tramp-suppress-trace t))
(unless (eq key tramp-cache-undefined)
(or (gethash key tramp-cache-data)
(let ((hash
(tramp-set-connection-property key (nth 1 elt) (nth 2 elt)))))
hash))))
+;; We cannot use the `declare' form for `tramp-suppress-trace' in
+;; autoloaded functions, because the tramp-loaddefs.el generation
+;; would fail.
+(function-put #'tramp-get-hash-table 'tramp-suppress-trace t)
+
;;;###tramp-autoload
(defun tramp-get-file-property (key file property &optional default)
"Get the PROPERTY of FILE from the cache context of KEY.
;; so .... here we are.
;;;###tramp-autoload(require 'cl-lib)
;;;###tramp-autoload
-(progn
- (cl-defstruct (tramp-file-name (:type list) :named)
- method user domain host port localname hop))
+(cl-defstruct (tramp-file-name (:type list) :named)
+ method user domain host port localname hop)
-(function-put #'tramp-file-name-method 'tramp-suppress-trace t)
-(function-put #'tramp-file-name-user 'tramp-suppress-trace t)
-(function-put #'tramp-file-name-domain 'tramp-suppress-trace t)
-(function-put #'tramp-file-name-host 'tramp-suppress-trace t)
-(function-put #'tramp-file-name-port 'tramp-suppress-trace t)
-(function-put #'tramp-file-name-localname 'tramp-suppress-trace t)
-(function-put #'tramp-file-name-hop 'tramp-suppress-trace t)
+(tramp--with-startup
+ (function-put #'tramp-file-name-method 'tramp-suppress-trace t)
+ (function-put #'tramp-file-name-user 'tramp-suppress-trace t)
+ (function-put #'tramp-file-name-domain 'tramp-suppress-trace t)
+ (function-put #'tramp-file-name-host 'tramp-suppress-trace t)
+ (function-put #'tramp-file-name-port 'tramp-suppress-trace t)
+ (function-put #'tramp-file-name-localname 'tramp-suppress-trace t)
+ (function-put #'tramp-file-name-hop 'tramp-suppress-trace t)
+ (function-put #'make-tramp-file-name 'tramp-suppress-trace t))
;;;###tramp-autoload
(defconst tramp-null-hop
(defun tramp-active-command-completion-p (_symbol _buffer)
"A predicate for Tramp interactive commands.
They are completed by `M-x TAB' only if there's an active connection or buffer."
- (declare (tramp-suppress-trace t))
+ ;; (declare (tramp-suppress-trace t))
(or (and (hash-table-p tramp-cache-data)
(not (zerop (hash-table-count tramp-cache-data))))
(tramp-list-remote-buffers)))
+;; We cannot use the `declare' form for `tramp-suppress-trace' in
+;; autoloaded functions, because the tramp-loaddefs.el generation
+;; would fail.
+(function-put #'tramp-active-command-completion-p 'tramp-suppress-trace t)
+
(defun tramp-connectable-p (vec-or-filename)
"Check if it is possible to connect the remote host without side-effects.
This is true, if either the remote host is already connected, or if we are