Silence compiler error
* lisp/net/tramp.el (tramp-file-name*): Embed `function-put' calls with `tramp--with-startup'. (tramp-active-command-completion-p) * lisp/net/tramp-cache.el (tramp-get-hash-table): Remove declare form. Add `tramp-suppress-trace' function property.
This commit is contained in:
parent
21ff61372b
commit
d33d8c089b
2 changed files with 23 additions and 12 deletions
|
@ -131,7 +131,7 @@ details see the info pages."
|
|||
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
|
||||
|
@ -144,6 +144,11 @@ If KEY is `tramp-cache-undefined', don't create anything, and return nil."
|
|||
(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.
|
||||
|
|
|
@ -1516,17 +1516,18 @@ calling HANDLER.")
|
|||
;; 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
|
||||
|
@ -2715,11 +2716,16 @@ They are completed by `M-x TAB' only if the current buffer is remote."
|
|||
(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
|
||||
|
|
Loading…
Add table
Reference in a new issue