Mule bugs: misidentification (Latin-1 vs. Chinese), revert issues

Aidan Kehoe kehoea
Tue Oct 24 14:57:48 EDT 2006


 Ar an ceathr? l? is fiche de m? Deireadh F?mhair, scr?obh stephen at xemacs.org: 

 > Aidan Kehoe writes:
 > 
 >  >  > I open a file with UTF-8 coding-system.  I touch that file outside of
 >  >  > XEmacs and then do M-x revert-buffer RET.  The non-ASCII characters
 >  >  > get mangled.
 >  > 
 >  > There?s a comment from Ben in the sources about this problem: 
 > 
 > What does Ben's comment have to do with coding systems, other than
 > that they reduce the utility of replace-mode to zero?

The comment doesn?t mention the replacement algorithm not being followed for
any content whatsoever; I find it misleading. But you?re right, and
Michael?s problem is a separate issue--this code isn?t even buggy, despite
what I thought.

Mike, I can?t reproduce your problem locally, but does this patch eliminate
it for you? 

--- lisp/files.el~	2005-11-18 12:12:07.000000000 +0100
+++ lisp/files.el	2006-10-24 20:48:22.000000000 +0200
@@ -3521,7 +3521,10 @@
 	      after-change-function
 	      after-change-functions
 	      before-change-function
-	      before-change-functions)
+	      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))
 	  (if revert-buffer-insert-file-contents-function
 	      (funcall revert-buffer-insert-file-contents-function
 		       file-name nil)

-- 
Santa Maradona, priez pour moi!



More information about the XEmacs-Beta mailing list