Aidan's recent fix (of 2006-10-27) worked, except for the "binary"
coding system, if that was determined implicitly. The reason is the
handling of buffer-local variables. (First against the wall when the
revolution comes.)
Aidan, could you have a look at this before I commit?
Index: lisp/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.771
diff -u -r1.771 ChangeLog
2006-11-28 Mike Sperber <mike(a)xemacs.org>
* files.el (revert-buffer-internal): Determine the coding system
while still in the original buffer, rather than the new one.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
Index: lisp/files.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/files.el,v
retrieving revision 1.76
diff -u -r1.76 files.el
--- lisp/files.el 27 Oct 2006 19:07:33 -0000 1.76
+++ lisp/files.el 28 Nov 2006 16:29:25 -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)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches