aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2008-02-18 02:41:11 +0000
committerJason Rumney2008-02-18 02:41:11 +0000
commit228de8de4f72d92bdf4b3395086c826933ab6a72 (patch)
tree83e5c0e99ff5efcaf4c383a17a411414779097e7
parent9cd41aa99e53700ece7f4ce278b799fedb892c59 (diff)
downloademacs-228de8de4f72d92bdf4b3395086c826933ab6a72.tar.gz
emacs-228de8de4f72d92bdf4b3395086c826933ab6a72.zip
(xml-find-file-coding-system): Don't warn about utf-16 with BOM.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/international/mule.el10
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7c814c4c2e3..24800d3bad1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12008-02-18 Jason Rumney <jasonr@gnu.org> 12008-02-18 Jason Rumney <jasonr@gnu.org>
2 2
3 * international/mule.el (xml-find-file-coding-system): Don't warn
4 about utf-16 with BOM.
5
3 * nxml/nxml-mode.el (nxml-mode): Don't add a write-contents-hook. 6 * nxml/nxml-mode.el (nxml-mode): Don't add a write-contents-hook.
4 7
5 * international/mule.el (sgml-xml-auto-coding-function): Detect 8 * international/mule.el (sgml-xml-auto-coding-function): Detect
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 7952c7a6878..d6305814a09 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -2341,12 +2341,16 @@ added by processing software."
2341 (coding-system-base 2341 (coding-system-base
2342 (detect-coding-region (point-min) (point-max) t))))) 2342 (detect-coding-region (point-min) (point-max) t)))))
2343 ;; Pure ASCII always comes back as undecided. 2343 ;; Pure ASCII always comes back as undecided.
2344 (if (memq detected '(utf-8 undecided)) 2344 (cond
2345 'utf-8 2345 ((memq detected '(utf-8 undecided))
2346 'utf-8)
2347 ((eq detected 'utf-16le-with-signature) 'utf-16le-with-signature)
2348 ((eq detected 'utf-16be-with-signature) 'utf-16be-with-signature)
2349 (t
2346 (warn "File contents detected as %s. 2350 (warn "File contents detected as %s.
2347 Consider adding an xml declaration with the encoding specified, 2351 Consider adding an xml declaration with the encoding specified,
2348 or saving as utf-8, as mandated by the xml specification." detected) 2352 or saving as utf-8, as mandated by the xml specification." detected)
2349 detected)) 2353 detected)))
2350 ;; Don't interfere with the user's wishes for saving the buffer. 2354 ;; Don't interfere with the user's wishes for saving the buffer.
2351 ;; We did what we could when the buffer was created to ensure the 2355 ;; We did what we could when the buffer was created to ensure the
2352 ;; correct encoding was used, or the user was warned, so any 2356 ;; correct encoding was used, or the user was warned, so any