aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2001-05-17 11:26:56 +0000
committerGerd Moellmann <[email protected]>2001-05-17 11:26:56 +0000
commit2ca0d5f1130631c099b865185fc3257331209b6f (patch)
tree1843c59f9a53d0bcb5f44d9b4c293594050c43aa /lisp/net
parent8f7cad1fa5a7ee6a8d49b353ec02af52881aebd7 (diff)
(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.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/ange-ftp.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index e307a7dbfd..9f3a2ed752 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1,6 +1,7 @@
;;; ange-ftp.el --- transparent FTP support for GNU Emacs
-;; Copyright (C) 1989,90,91,92,93,94,95,96,98, 00 Free Software Foundation, Inc.
+;; Copyright (C) 1989,90,91,92,93,94,95,96,98, 2000, 2001
+;; Free Software Foundation, Inc.
;; Author: Andy Norman ([email protected])
;; Maintainer: FSF
@@ -3141,12 +3142,13 @@ system TYPE.")
(filename (buffer-file-name))
(mod-p (buffer-modified-p)))
(unwind-protect
- (ange-ftp-real-write-region start end temp nil visit)
+ (progn
+ (ange-ftp-real-write-region start end temp nil visit)
+ (setq coding-system-used last-coding-system-used))
;; cleanup forms
+ (setq coding-system-used last-coding-system-used)
(setq buffer-file-name filename)
(set-buffer-modified-p mod-p)))
- ;; save value used by the real write-region
- (setq coding-system-used last-coding-system-used)
(if binary
(ange-ftp-set-binary-mode host user))