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.
This commit is contained in:
Michael Albinus 2021-10-03 14:27:26 +02:00
parent b228ec9fab
commit 3dae1e33d1
2 changed files with 8 additions and 5 deletions

View file

@ -222,7 +222,8 @@ 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
(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))

View file

@ -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