changeset 3714:cee87f8de64b

[xemacs-hg @ 2006-11-30 07:29:34 by michaels] 2006-11-28 Mike Sperber <mike@xemacs.org> * files.el (revert-buffer-internal): Determine the coding system while still in the original buffer, rather than the new one.
author michaels
date Thu, 30 Nov 2006 07:29:36 +0000
parents 8109a63bce88
children 42b6cf5364ae
files lisp/ChangeLog lisp/files.el
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Nov 29 22:51:10 2006 +0000
+++ b/lisp/ChangeLog	Thu Nov 30 07:29:36 2006 +0000
@@ -1,3 +1,8 @@
+2006-11-28  Mike Sperber  <mike@xemacs.org>
+
+	* files.el (revert-buffer-internal): Determine the coding system
+	while still in the original buffer, rather than the new one.
+
 2006-11-29  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* mule/mule-charset.el:
--- a/lisp/files.el	Wed Nov 29 22:51:10 2006 +0000
+++ b/lisp/files.el	Thu Nov 30 07:29:36 2006 +0000
@@ -3512,7 +3512,10 @@
 Return nil if identical, and the new buffer if different."
 
   (let* ((newbuf (get-buffer-create " *revert*"))
-	 bmin bmax)
+	 bmin bmax
+	 ;; #### b-f-c-s is _not necessarily_ the coding system that
+	 ;; was used to read in the file. See its docstring.
+	 (coding-system buffer-file-coding-system))
     (save-excursion
       (set-buffer newbuf)
       (with-obsolete-variable '(before-change-function after-change-function)
@@ -3522,9 +3525,8 @@
 	      after-change-functions
 	      before-change-function
 	      before-change-functions
-	      ;; #### b-f-c-s is _not necessarily_ the coding system that
-	      ;; was used to read in the file. See its docstring.
-	      (coding-system-for-read buffer-file-coding-system))
+	      (coding-system-for-read coding-system)
+	      )
 	  (if revert-buffer-insert-file-contents-function
 	      (funcall revert-buffer-insert-file-contents-function
 		       file-name nil)