From f419c507a778b87edd95983e8ea37f162ce50bf3 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 20 Sep 2022 14:07:45 +0200 Subject: [PATCH] Wrap max-specpdl-size with with-no-warnings in Tramp * lisp/net/tramp-archive.el (max-specpdl-size): * lisp/net/tramp-gvfs.el (max-specpdl-size): Wrap with `with-no-warnings'. --- lisp/net/tramp-archive.el | 9 ++++++--- lisp/net/tramp-gvfs.el | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 9ff5d6ac75d..b343e460df6 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -112,8 +112,10 @@ (eval-when-compile (require 'cl-lib)) ;; Sometimes, compilation fails with "Variable binding depth exceeds ;; max-specpdl-size". Shall be fixed in Emacs 27. -(eval-and-compile - (let ((max-specpdl-size (* 2 max-specpdl-size))) (require 'tramp-gvfs))) +(with-no-warnings ;; max-specpdl-size + (eval-and-compile + (let ((max-specpdl-size (* 2 max-specpdl-size))) + (require 'tramp-gvfs)))) (autoload 'dired-uncache "dired") (autoload 'url-tramp-convert-url-to-tramp "url-tramp") @@ -343,6 +345,7 @@ arguments to pass to the OPERATION." (tramp-register-file-name-handlers) (tramp-archive-run-real-handler operation args)) + (with-no-warnings ;; max-specpdl-size (let* ((filename (apply #'tramp-archive-file-name-for-operation operation args)) (archive (tramp-archive-file-name-archive filename)) @@ -376,7 +379,7 @@ arguments to pass to the OPERATION." (setq args (cons operation args))) (if fn (save-match-data (apply (cdr fn) args)) - (tramp-archive-run-real-handler operation args))))))) + (tramp-archive-run-real-handler operation args)))))))) ;;;###autoload (progn (defun tramp-archive-autoload-file-name-handler (operation &rest args) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index cf23676b0c2..477f8fb3fdd 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -2505,6 +2505,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi." result)))) (when tramp-gvfs-enabled + (with-no-warnings ;; max-specpdl-size ;; Suppress D-Bus error messages and Tramp traces. (let (;; Sometimes, it fails with "Variable binding depth exceeds ;; max-specpdl-size". Shall be fixed in Emacs 27. @@ -2562,7 +2563,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi." "mtp" (mapcar (lambda (method) `(tramp-parse-media-names ,(format "_%s._tcp" method))) - tramp-media-methods)))) + tramp-media-methods))))) (add-hook 'tramp-unload-hook (lambda () -- 2.39.2