]> code.delx.au - gnu-emacs/blobdiff - lisp/international/mule-conf.el
Update copyright year to 2014 by running admin/update-copyright.
[gnu-emacs] / lisp / international / mule-conf.el
index 11207b0b78dc1b9647b384fb6cbc0798a14140cf..7ae4426ccc56f4acd936feb1475a216b0f85b4dd 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mule-conf.el --- configure multilingual environment
 
-;; Copyright (C) 1997-201 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2014 Free Software Foundation, Inc.
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 ;; script which IS-13194 supports.
 
 (define-charset 'indian-is13194
-  "Generic Indian charset for data exchange with IS 13194"
-  :short-name "IS 13194"
-  :long-name "Indian IS 13194"
+  "7-bit representation of IS 13194 (ISCII) for Devanagari"
+  :short-name "IS 13194 (DEV)"
+  :long-name "Indian IS 13194 (DEV)"
   :iso-final-char ?5
   :emacs-mule-id 225
   :supplementary-p t
   :code-space [33 126]
-  :code-offset #x180000)
+  :code-offset #x180000
+  :unify-map "MULE-is13194")
 
 (let ((code-offset #x180100))
   (dolist (script '(devanagari sanskrit bengali tamil telugu assamese
 (unify-charset 'ipa)
 (unify-charset 'tibetan)
 (unify-charset 'ethiopic)
+(unify-charset 'indian-is13194)
 (unify-charset 'japanese-jisx0208-1978)
 (unify-charset 'japanese-jisx0208)
 (unify-charset 'japanese-jisx0212)
 (define-coding-system-alias 'dos 'undecided-dos)
 (define-coding-system-alias 'mac 'undecided-mac)
 
+(define-coding-system 'prefer-utf-8
+  "Like `undecided' but prefer UTF-8 when appropriate.
+On decoding, if the source contains 8-bit codes and they all
+are valid UTF-8 sequences, detect the source as UTF-8 encoding
+regardless of the coding priority.
+On encoding, if the source contains non-ASCII characters, encode them
+by UTF-8."
+  :coding-type 'undecided
+  :mnemonic ?-
+  :charset-list '(emacs)
+  :prefer-utf-8 t)
+
 (define-coding-system 'raw-text
   "Raw text, which means text contains random 8-bit codes.
 Encoding text with this coding system produces the actual byte
@@ -1508,6 +1522,7 @@ for decoding and encoding files, process I/O, etc."
 (setq file-coding-system-alist
       (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg)))
       '(("\\.elc\\'" . utf-8-emacs)
+       ("\\.el\\'" . prefer-utf-8)
        ("\\.utf\\(-8\\)?\\'" . utf-8)
        ("\\.xml\\'" . xml-find-file-coding-system)
        ;; We use raw-text for reading loaddefs.el so that if it