]> git.eshelyaron.com Git - emacs.git/commitdiff
Wrap max-specpdl-size with with-no-warnings in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 20 Sep 2022 12:07:45 +0000 (14:07 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 20 Sep 2022 12:07:45 +0000 (14:07 +0200)
* 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
lisp/net/tramp-gvfs.el

index 9ff5d6ac75d6ce4e97cffa52bbff0720f4aee5a9..b343e460df6c026ee042606fc5df611758c53136 100644 (file)
 (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)
index cf23676b0c2f28c7a1afd0f3ef75be6a2b2b983f..477f8fb3fdd087437ffc5e7b9eda372cdeaf7e60 100644 (file)
@@ -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 ()