diff lisp/files.el @ 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 305157cf3ebb
children f901409b074b
line wrap: on
line diff
--- 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)