comparison lisp/net/ange-ftp.el @ 37774:a3b587b05ab3

(ange-ftp-write-region): Make sure to record the last coding system used before calling set-buffer-modified-p because that function changes last-coding-system.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 17 May 2001 11:24:28 +0000
parents ac44722a4f19
children 989feabdf50e
comparison
equal deleted inserted replaced
37773:9b4454d43e72 37774:a3b587b05ab3
1 ;;; ange-ftp.el --- transparent FTP support for GNU Emacs 1 ;;; ange-ftp.el --- transparent FTP support for GNU Emacs
2 2
3 ;; Copyright (C) 1989,90,91,92,93,94,95,96,98, 00 Free Software Foundation, Inc. 3 ;; Copyright (C) 1989,90,91,92,93,94,95,96,98, 2000, 2001
4 ;; Free Software Foundation, Inc.
4 5
5 ;; Author: Andy Norman (ange@hplb.hpl.hp.com) 6 ;; Author: Andy Norman (ange@hplb.hpl.hp.com)
6 ;; Maintainer: FSF 7 ;; Maintainer: FSF
7 ;; Keywords: comm 8 ;; Keywords: comm
8 9
3139 (progn 3140 (progn
3140 (let ((executing-kbd-macro t) 3141 (let ((executing-kbd-macro t)
3141 (filename (buffer-file-name)) 3142 (filename (buffer-file-name))
3142 (mod-p (buffer-modified-p))) 3143 (mod-p (buffer-modified-p)))
3143 (unwind-protect 3144 (unwind-protect
3144 (ange-ftp-real-write-region start end temp nil visit) 3145 (progn
3146 (ange-ftp-real-write-region start end temp nil visit)
3147 (setq coding-system-used last-coding-system-used))
3145 ;; cleanup forms 3148 ;; cleanup forms
3149 (setq coding-system-used last-coding-system-used)
3146 (setq buffer-file-name filename) 3150 (setq buffer-file-name filename)
3147 (set-buffer-modified-p mod-p))) 3151 (set-buffer-modified-p mod-p)))
3148 ;; save value used by the real write-region
3149 (setq coding-system-used last-coding-system-used)
3150 (if binary 3152 (if binary
3151 (ange-ftp-set-binary-mode host user)) 3153 (ange-ftp-set-binary-mode host user))
3152 3154
3153 ;; tell the process filter what size the transfer will be. 3155 ;; tell the process filter what size the transfer will be.
3154 (let ((attr (file-attributes temp))) 3156 (let ((attr (file-attributes temp)))