From 060766cf2c67314539e3002078add7f3fe3c6f86 Mon Sep 17 00:00:00 2001 From: Michael Albinus <michael.albinus@gmx.de> Date: Sun, 30 Jul 2023 16:53:37 +0200 Subject: [PATCH] ; Fixh last change * lisp/net/tramp-message.el (tramp-file-name-host-port) (tramp-file-name-user-domain): Declare. (tramp-message): Remove declare form. Add `tramp-suppress-trace' function property. * lisp/net/tramp.el (tramp-file-name-user-domain) (tramp-file-name-host-port): Remove ;;;###tramp-autoload cookie. (tramp-file-name-unify, tramp-dissect-file-name) (tramp-ensure-dissected-file-name): Remove declare form. Add `tramp-suppress-trace' function property. --- lisp/net/tramp-message.el | 6 +++++- lisp/net/tramp.el | 14 +++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lisp/net/tramp-message.el b/lisp/net/tramp-message.el index 98f202102dd..cf90db1d6b1 100644 --- a/lisp/net/tramp-message.el +++ b/lisp/net/tramp-message.el @@ -52,6 +52,8 @@ (declare-function tramp-compat-string-replace "tramp-compat") (declare-function tramp-file-name-equal-p "tramp") +(declare-function tramp-file-name-host-port "tramp") +(declare-function tramp-file-name-user-domain "tramp") (declare-function tramp-get-default-directory "tramp") (defvar tramp-compat-temporary-file-directory) @@ -304,7 +306,6 @@ is greater than or equal 4. Calls functions `message' and `tramp-debug-message' with FMT-STRING as control string and the remaining ARGUMENTS to actually emit the message (if applicable)." - (declare (tramp-suppress-trace t)) (ignore-errors (when (<= level tramp-verbose) ;; Display only when there is a minimum level, and the progress @@ -345,6 +346,9 @@ applicable)." (concat (format "(%d) # " level) fmt-string) arguments)))))) +;; We cannot declare our private symbols in loaddefs. +(function-put 'tramp-message 'tramp-suppress-trace t) + (defsubst tramp-backtrace (&optional vec-or-proc force) "Dump a backtrace into the debug buffer. If VEC-OR-PROC is nil, the buffer *debug tramp* is used. FORCE diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 34ecd383621..76674e5207f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1448,7 +1448,6 @@ calling HANDLER.") (make-tramp-file-name :user (user-login-name) :host tramp-system-name) "Connection hop which identifies the virtual hop before the first one.") -;;;###tramp-autoload (defun tramp-file-name-user-domain (vec) "Return user and domain components of VEC." (declare (tramp-suppress-trace t)) @@ -1458,7 +1457,6 @@ calling HANDLER.") tramp-prefix-domain-format) (tramp-file-name-domain vec)))) -;;;###tramp-autoload (defun tramp-file-name-host-port (vec) "Return host and port components of VEC." (declare (tramp-suppress-trace t)) @@ -1482,7 +1480,6 @@ If LOCALNAME is an absolute file name, set it as localname. If LOCALNAME is a relative file name, return `tramp-cache-undefined'. Objects returned by this function compare `equal' if they refer to the same connection. Make a copy in order to avoid side effects." - (declare (tramp-suppress-trace t)) (if (and (stringp localname) (not (file-name-absolute-p localname))) (setq vec tramp-cache-undefined) @@ -1494,6 +1491,9 @@ same connection. Make a copy in order to avoid side effects." (tramp-file-name-hop vec) nil)) vec)) +;; We cannot declare our private symbols in loaddefs. +(function-put 'tramp-file-name-unify 'tramp-suppress-trace t) + ;; Comparison of file names is performed by `tramp-equal-remote'. (defun tramp-file-name-equal-p (vec1 vec2) "Check, whether VEC1 and VEC2 denote the same `tramp-file-name'. @@ -1635,7 +1635,6 @@ localname (file name on remote host), and hop. Unless NODEFAULT is non-nil, method, user and host are expanded to their default values. For the other file name parts, no default values are used." - (declare (tramp-suppress-trace t)) (save-match-data (unless (tramp-tramp-file-p name) (tramp-user-error nil "Not a Tramp file name: \"%s\"" name)) @@ -1692,18 +1691,23 @@ default values are used." (tramp-user-error v "Method `%s' is not supported for multi-hops" method))))))) +;; We cannot declare our private symbols in loaddefs. +(function-put 'tramp-dissect-file-name 'tramp-suppress-trace t) + ;;;###tramp-autoload (defun tramp-ensure-dissected-file-name (vec-or-filename) "Return a `tramp-file-name' structure for VEC-OR-FILENAME. VEC-OR-FILENAME may be either a string or a `tramp-file-name'. If it's not a Tramp filename, return nil." - (declare (tramp-suppress-trace t)) (cond ((tramp-file-name-p vec-or-filename) vec-or-filename) ((tramp-tramp-file-p vec-or-filename) (tramp-dissect-file-name vec-or-filename)))) +;; We cannot declare our private symbols in loaddefs. +(function-put 'tramp-ensure-dissected-file-name 'tramp-suppress-trace t) + (defun tramp-dissect-hop-name (name &optional nodefault) "Return a `tramp-file-name' structure of `hop' part of NAME. See `tramp-dissect-file-name' for details." -- 2.39.5