summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2021-10-03 14:27:26 +0200
committerMichael Albinus <michael.albinus@gmx.de>2021-10-03 14:27:26 +0200
commit3dae1e33d19e2a7e0f879a38354944c9d567c9d3 (patch)
tree549aee5127effcec98cc828bfb8d528992d7dbcb /lisp/net
parentb228ec9fab8ea5e09da4d3c3f41d7859d88afb7d (diff)
downloademacs-3dae1e33d19e2a7e0f879a38354944c9d567c9d3.tar.gz
Suppress superfluous error messages in Tramp
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-insert-file-contents): * lisp/net/tramp.el (tramp-handle-insert-file-contents) (tramp-handle-lock-file): Suppress superfluous error message.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp-sshfs.el7
-rw-r--r--lisp/net/tramp.el6
2 files changed, 8 insertions, 5 deletions
diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el
index 0019ac014f8..688e408bfb0 100644
--- a/lisp/net/tramp-sshfs.el
+++ b/lisp/net/tramp-sshfs.el
@@ -222,9 +222,10 @@ arguments to pass to the OPERATION."
(defun tramp-sshfs-handle-insert-file-contents
(filename &optional visit beg end replace)
"Like `insert-file-contents' for Tramp files."
- (let ((result
- (insert-file-contents
- (tramp-fuse-local-file-name filename) visit beg end replace)))
+ (let* (signal-hook-function
+ (result
+ (insert-file-contents
+ (tramp-fuse-local-file-name filename) visit beg end replace)))
(when visit (setq buffer-file-name filename))
(cons (expand-file-name filename) (cdr result))))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 62628363b77..b69e143ff14 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3743,7 +3743,8 @@ User is always nil."
(with-parsed-tramp-file-name filename nil
(unwind-protect
(if (not (file-exists-p filename))
- (tramp-compat-file-missing v filename)
+ (let ((tramp-verbose (if visit 0 tramp-verbose)))
+ (tramp-compat-file-missing v filename))
(with-tramp-progress-reporter
v 3 (format-message "Inserting `%s'" filename)
@@ -3920,7 +3921,8 @@ Return nil when there is no lockfile."
(tramp-error v 'file-error "Unsafe lock file name")))
;; Do the lock.
- (let (create-lockfiles signal-hook-function)
+ (let ((tramp-verbose 0)
+ create-lockfiles signal-hook-function)
(condition-case nil
(make-symbolic-link info lockname 'ok-if-already-exists)
(error