[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/international/mule.el,v
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/international/mule.el,v |
Date: |
Mon, 18 Feb 2008 02:40:39 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Jason Rumney <jasonr> 08/02/18 02:40:38
Index: mule.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/international/mule.el,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -b -r1.265 -r1.266
--- mule.el 18 Feb 2008 01:45:53 -0000 1.265
+++ mule.el 18 Feb 2008 02:40:38 -0000 1.266
@@ -2341,12 +2341,16 @@
(coding-system-base
(detect-coding-region (point-min) (point-max) t)))))
;; Pure ASCII always comes back as undecided.
- (if (memq detected '(utf-8 undecided))
- 'utf-8
+ (cond
+ ((memq detected '(utf-8 undecided))
+ 'utf-8)
+ ((eq detected 'utf-16le-with-signature) 'utf-16le-with-signature)
+ ((eq detected 'utf-16be-with-signature) 'utf-16be-with-signature)
+ (t
(warn "File contents detected as %s.
Consider adding an xml declaration with the encoding specified,
or saving as utf-8, as mandated by the xml specification." detected)
- detected))
+ detected)))
;; Don't interfere with the user's wishes for saving the buffer.
;; We did what we could when the buffer was created to ensure the
;; correct encoding was used, or the user was warned, so any