From: Michael Albinus <michael.albinus@gmx.de>
Date: Mon, 14 Aug 2023 07:42:43 +0000 (+0200)
Subject: ; * lisp/net/tramp.el (tramp-skeleton-write-region): Fix last change.
X-Git-Tag: emacs-29.1.90~209
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fdab7aaadac;p=emacs.git

; * lisp/net/tramp.el (tramp-skeleton-write-region): Fix last change.
---

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index caa6baabc31..d10f93b34b2 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3781,7 +3781,7 @@ BODY is the backend specific code."
 	   ;; likely that it is needed shortly after `write-region'.
 	   (tramp-set-file-property v localname "file-exists-p" t)
 
-	   (let ((need-chown t))
+	   (let (last-coding-system-used (need-chown t))
 	     ;; Set file modification time.
 	     (when (or (eq ,visit t) (stringp ,visit))
 	       (when-let ((file-attr (file-attributes filename 'integer)))