Commits

stephent  committed 0ab2a59

Maintainer update <87y9gju4r6.fsf@tleeps18.sk.tsukuba.ac.jp>

  • Participants
  • Parent commits 25a47e4

Comments (0)

Files changed (10)

 custom-load.el
 package-info
 pdepends.mk
+*.info*
+2002-03-23  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* .cvsignore: Add Info files.
+
+	* Makefile (PRELOADS): Add latin-unity-latin9.
+
+	* latin-unity.texi (Interactive Usage): Fix a typo.  Describe
+	completion and "guessing" for remap/recoding functions.  Update
+	version, this is pretty good.
+
+	* README: Update for revised implementation.
+
+	* latin-unity.el: Require latin-unity-utils instead of precomputed
+	latin-unity-tables when character-to-unicode is built-in.
+
+	* latin-unity-utils.el: Remove Mule-UCS dependency for >= 21.5.5.
+	Require latin-unity-latin9 and latin-unity-vars, not latin-unity.
+	(latin-unity-dump-tables): Make non-Latin charsets implicit.
+	Insert creation date.  Fiddle with header and trailer inserted.
+	* latin-unity-tables.el: Regenerated.
+
+	* latin-unity-latin10.el: New file, not in CVS.  Ask author.
+
+	* latin-unity-latin9.el: Condition EuroSign keysym defs properly.
+
+	* latin-unity-vars.el: Improve Commentary.
+	(latin-unity-debug): Customize.
+	(latin-unity-coding-systems): Check if codesys defined at runtime.
+	(latin-unity-character-sets): Check if charset defined at runtime.
+	(latin-unity-cset-codesys-alist): Check if codesys defined at runtime.
+
+2002-03-19  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* latin-unity-vars.el, latin-unity-latin9.el: Fix Latin-9
+	docstring to not need Latin-9 charset predefined, move charset and
+	coding system definitions from former to latter.
+
+2002-03-16  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* latin-unity-latin9.el (latin-9): Improve documentation for
+	environment.
+
 2002-03-12  Adrian Aichner  <adrian@xemacs.org>
 
 	* latin-unity.texi: Fix typos found by my own
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-# Last-Modified: 14 March 2002
+# Last-modified: 2002 March 23
 
 # The XEmacs CVS version is canonical.  Keep versions n'sync.
 VERSION = 1.00
        latin-unity-latin9.elc latin-unity-tables.elc latin-unity-utils.elc
 
 # for defvars and creation of ISO 8859/15 charset and coding system
-PRELOADS=-l cl-macs -l latin-unity-vars.el
+PRELOADS=-l cl-macs -l latin-unity-latin9.el -l latin-unity-vars.el
 
 TEXI_FILES = $(PACKAGE).texi
 INFO_FILES = $(PACKAGE).info
 ***** latin-unity
 
-Last-modified: 2002 March 14
+Last-modified: 2002 March 22
 
 Mule bogusly considers the various ISO-8859 extended character sets as
 disjoint, when ISO 8859 itself clearly considers them to be subsets of
 
   o Fix JIS Roman (as an alternative to ASCII) support.
 
-  o Support Latin-10 (ISO 8859/16) aka Latin-2 + EURO SIGN.
+  o Support Latin-10 (ISO 8859/16) and maybe others.
 
   o More UI features (like highlighting unrepresentable chars in buffer).
 
 latin-unity.el is the main library, providing the detection and translation
 functionality, including a hook function to hang on `write-region-pre-hook'.
 
-latin-unity-vars.el contains the definition of ISO 8859/15 and variables
-common to several modules.
+latin-unity-vars.el contains the definition of variables common to
+several modules.
 
-latin-unity-latin9.el defines the Latin-9 environment.  It contains
-Latin-9 characters so cannot be part of latin-unity-vars.el.
+latin-unity-latin9.el defines ISO 8859/15 and the Latin-9 environment.
 
 latin-euro-input.el contains Dave Love's Quail input method for Latin 9.
 
 latin-unity-tables.el contains the table of feasible character sets and
 equivalent Mule characters from other character sets for the various Mule
-representations of each character.  Automatically generated.
+representations of each character.  Automatically generated.  Used only when
+Unicode support is not present.
 
-latin-unity-utils.el contains utilities for creating the equivalence
-table.
+latin-unity-utils.el contains utilities for creating the equivalence table,
+and dumping it to a file.  Used in preference to the precomputed table when
+Unicode support is available.
 
 

File latin-unity-latin9.el

 ;; Author: Stephen J. Turnbull
 ;; Keywords: mule, charsets
 ;; Created: 2002 March 7
-;; Last-modified: 2002 March 7
+;; Last-modified: 2002 March 23
 
 ;; This file is part of XEmacs.
 
 
 ;; Provides the latin-9 language environment.
 
-;; The 'iso-8859-15 coding system must be defined before this file is loaded
-;; in XEmacsen before 21.4.7 and 21.5.6.  No, it can't be required here, it's
-;; already too late.
-
 ;;; Code:
 
+;; define ISO-8859-15 for XEmacs 21.4 and earlier
+;;;###autoload
+(unless (find-charset 'latin-iso8859-15)
+  ;; Create character set
+  (make-charset
+   'latin-iso8859-15 "ISO8859-15 (Latin 9)"
+   '(short-name "Latin-9"
+     long-name "ISO8859-15 (Latin 9)"
+     registry "iso8859-15"
+     dimension 1
+     columns 1
+     chars 96
+     final ?b
+     graphic 1
+     direction l2r))
+  ;; For syntax of Latin-9 characters.
+  (require 'cl)
+  (load-library "cl-macs")		; howcum no #'provide?
+  (loop for c from 64 to 127		; from ',b@(B' to ',b(B'
+    do (modify-syntax-entry (make-char 'latin-iso8859-15 c) "w"))
+  (mapc (lambda (c)
+	  (modify-syntax-entry (make-char 'latin-iso8859-15 c) "w"))
+	'(#xA6 #xA8 #xB4 #xB8 #xBC #xBD #xBE))
+  
+  (modify-syntax-entry (make-char 'latin-iso8859-15 32) "w") ; no-break space
+  (modify-syntax-entry (make-char 'latin-iso8859-15 87) "_") ; multiply
+  (modify-syntax-entry (make-char 'latin-iso8859-15 119) "_") ; divide
+  )
+
+;;;###autoload
+(unless (find-coding-system 'iso-8859-15)
+  ;; Create coding system
+  (make-coding-system
+   'iso-8859-15 'iso2022 "MIME ISO-8859-15"
+   '(charset-g0 ascii
+     charset-g1 latin-iso8859-15
+     charset-g2 t			; grrr
+     charset-g3 t			; grrr
+     mnemonic "MIME/Ltn-9")))
+
+;;;###autoload
 (unless (assoc "Latin-9" language-info-alist)
   (defun setup-latin9-environment ()
     "Set up multilingual environment (MULE) for European Latin-9 users."
     (set-language-environment "Latin-9"))
 
   (set-language-info-alist
-   "Latin-9" '((charset ascii latin-iso8859-15)
-	       (coding-system iso-8859-15)
-	       (coding-priority iso-8859-15)
-	       (input-method . "latin-9-prefix")
-	       (sample-text
-		. "Hello, Hej, Tere, Hei, Bonjour, Gr�� Gott, Ciao, �Hola!, my �0.02")
-	       (documentation . "\
-This language environment is a generic one for Latin-9 (ISO-8859-15)
-character set which supports the Euro and the following languages:
+   "Latin-9"
+   `((charset ascii latin-iso8859-15)
+     (coding-system iso-8859-15)
+     (coding-priority iso-8859-15)
+     (input-method . "latin-9-prefix")
+     (sample-text
+      .
+      ,(format
+	"Hello, Hej, Tere, Hei, Bonjour, Gr%c%c Gott, Ciao, %cHola!, my %c0.02"
+	(make-char 'latin-iso8859-15 #x7C)	; SMALL U WITH UMLAUT
+	(make-char 'latin-iso8859-15 #x5F)	; GERMAN SHARP S
+	(make-char 'latin-iso8859-15 #x21)	; INVERTED EXCLAMATION MARK
+	(make-char 'latin-iso8859-15 #x24)	; EURO SIGN
+	))
+     (documentation . "\
+This is a generic language environment for Latin-9 (ISO-8859-15).  It
+supports the Euro and the following languages:
  Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
  Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
 We also have a German specific language environment \"German\"."))
    '("European")))
 
-;; bind the EuroSign keysym
-(define-key global-map [EuroSign] #'self-insert-command)
-(put 'EuroSign 'ascii-character (make-char 'latin-iso8859-15 #x24))
+;; #### move these to a separate file for keysyms.
+
+;;;###autoload
+(unless (lookup-key global-map [EuroSign])
+  (define-key global-map [EuroSign] #'self-insert-command))
+
+;;;###autoload
+(unless (get 'EuroSign 'ascii-character)
+  (put 'EuroSign 'ascii-character (make-char 'latin-iso8859-15 #x24)))
 
 (provide 'latin-unity-latin9)
 

File latin-unity-tables.el

-;;; initialize latin-unity-equivalences
-;;; Do not edit -- automatically generated.
+;;; latin-unity-tables.el --- initialize latin-unity-equivalences
+;; Do not edit -- automatically generated.
+;; Created: 2002 March 23
 (provide 'latin-unity-tables)
 (defconst latin-unity-equivalences
   (let ((table (make-char-table 'generic)))
+    ;; default all non-Latin charsets
+    (put-char-table t [0 nil nil nil nil nil nil nil nil nil] table)
+    ;; Control 1 code points are spatial
+    ;; Warning on these is beyond this library's scope.
+    (put-char-table 'control-1 [255 nil nil nil nil nil nil nil nil nil] table)
     (put-char-table (make-char 'ascii 0) (vector #x40 nil nil nil nil nil nil (make-char 'ascii 0) nil #x0) table)
     (put-char-table (make-char 'ascii 1) (vector #x40 nil nil nil nil nil nil (make-char 'ascii 1) nil #x1) table)
     (put-char-table (make-char 'ascii 2) (vector #x40 nil nil nil nil nil nil (make-char 'ascii 2) nil #x2) table)
     (put-char-table (make-char 'latin-iso8859-4 125) (vector #x8 nil nil nil (make-char 'latin-iso8859-4 125) nil nil nil nil #x169) table)
     (put-char-table (make-char 'latin-iso8859-4 126) (vector #x8 nil nil nil (make-char 'latin-iso8859-4 126) nil nil nil nil #x16B) table)
     (put-char-table (make-char 'latin-iso8859-4 127) (vector #xE nil (make-char 'latin-iso8859-2 127) (make-char 'latin-iso8859-3 127) (make-char 'latin-iso8859-4 127) nil nil nil nil #x2D9) table)
-    (put-char-table 'thai-tis620 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'greek-iso8859-7 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'arabic-iso8859-6 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'hebrew-iso8859-8 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'katakana-jisx0201 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
     (put-char-table (make-char 'latin-jisx0201 33) (vector #xC0 nil nil nil nil nil nil (make-char 'ascii 33) (make-char 'latin-jisx0201 33) #x21) table)
     (put-char-table (make-char 'latin-jisx0201 34) (vector #xC0 nil nil nil nil nil nil (make-char 'ascii 34) (make-char 'latin-jisx0201 34) #x22) table)
     (put-char-table (make-char 'latin-jisx0201 35) (vector #xC0 nil nil nil nil nil nil (make-char 'ascii 35) (make-char 'latin-jisx0201 35) #x23) table)
     (put-char-table (make-char 'latin-jisx0201 124) (vector #xC0 nil nil nil nil nil nil (make-char 'ascii 124) (make-char 'latin-jisx0201 124) #x7C) table)
     (put-char-table (make-char 'latin-jisx0201 125) (vector #xC0 nil nil nil nil nil nil (make-char 'ascii 125) (make-char 'latin-jisx0201 125) #x7D) table)
     (put-char-table (make-char 'latin-jisx0201 126) (vector #x80 nil nil nil nil nil nil nil (make-char 'latin-jisx0201 126) #x203E) table)
-    (put-char-table 'cyrillic-iso8859-5 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
     (put-char-table (make-char 'latin-iso8859-9 32) (vector #x3F (make-char 'latin-iso8859-1 32) (make-char 'latin-iso8859-2 32) (make-char 'latin-iso8859-3 32) (make-char 'latin-iso8859-4 32) (make-char 'latin-iso8859-9 32) (make-char 'latin-iso8859-15 32) nil nil #xA0) table)
     (put-char-table (make-char 'latin-iso8859-9 33) (vector #x31 (make-char 'latin-iso8859-1 33) nil nil nil (make-char 'latin-iso8859-9 33) (make-char 'latin-iso8859-15 33) nil nil #xA1) table)
     (put-char-table (make-char 'latin-iso8859-9 34) (vector #x31 (make-char 'latin-iso8859-1 34) nil nil nil (make-char 'latin-iso8859-9 34) (make-char 'latin-iso8859-15 34) nil nil #xA2) table)
     (put-char-table (make-char 'latin-iso8859-9 125) (vector #x14 nil nil (make-char 'latin-iso8859-3 57) nil (make-char 'latin-iso8859-9 125) nil nil nil #x131) table)
     (put-char-table (make-char 'latin-iso8859-9 126) (vector #x16 nil (make-char 'latin-iso8859-2 58) (make-char 'latin-iso8859-3 58) nil (make-char 'latin-iso8859-9 126) nil nil nil #x15F) table)
     (put-char-table (make-char 'latin-iso8859-9 127) (vector #x31 (make-char 'latin-iso8859-1 127) nil nil nil (make-char 'latin-iso8859-9 127) (make-char 'latin-iso8859-15 127) nil nil #xFF) table)
-    (put-char-table 'japanese-jisx0208-1978 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-gb2312 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'japanese-jisx0208 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'korean-ksc5601 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'japanese-jisx0212 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-cns11643-1 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-cns11643-2 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-big5-1 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-big5-2 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'arabic-digit (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'arabic-1-column (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'arabic-2-column (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'sisheng (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'ipa (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'vietnamese-viscii-lower (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'vietnamese-viscii-upper (vector #x0 nil nil nil nil nil nil nil nil nil) table)
     (put-char-table (make-char 'latin-iso8859-15 32) (vector #x3F (make-char 'latin-iso8859-1 32) (make-char 'latin-iso8859-2 32) (make-char 'latin-iso8859-3 32) (make-char 'latin-iso8859-4 32) (make-char 'latin-iso8859-9 32) (make-char 'latin-iso8859-15 32) nil nil nil) table)
     (put-char-table (make-char 'latin-iso8859-15 33) (vector #x31 (make-char 'latin-iso8859-1 33) nil nil nil (make-char 'latin-iso8859-9 33) (make-char 'latin-iso8859-15 33) nil nil nil) table)
     (put-char-table (make-char 'latin-iso8859-15 34) (vector #x31 (make-char 'latin-iso8859-1 34) nil nil nil (make-char 'latin-iso8859-9 34) (make-char 'latin-iso8859-15 34) nil nil nil) table)
     (put-char-table (make-char 'latin-iso8859-15 125) (vector #x23 (make-char 'latin-iso8859-1 125) (make-char 'latin-iso8859-2 125) nil nil nil (make-char 'latin-iso8859-15 125) nil nil nil) table)
     (put-char-table (make-char 'latin-iso8859-15 126) (vector #x21 (make-char 'latin-iso8859-1 126) nil nil nil nil (make-char 'latin-iso8859-15 126) nil nil nil) table)
     (put-char-table (make-char 'latin-iso8859-15 127) (vector #x31 (make-char 'latin-iso8859-1 127) nil nil nil (make-char 'latin-iso8859-9 127) (make-char 'latin-iso8859-15 127) nil nil nil) table)
-    (put-char-table 'chinese-cns11643-3 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-cns11643-4 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-cns11643-5 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-cns11643-6 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-cns11643-7 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'chinese-isoir165 (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'ethiopic (vector #x0 nil nil nil nil nil nil nil nil nil) table)
-    (put-char-table 'thai-xtis (vector #x0 nil nil nil nil nil nil nil nil nil) table)
     table)
   "Map a (Latin) Mule character to the set of character sets containing it.")
+;;; end of latin-unity-tables.el

File latin-unity-utils.el

 
 ;; Author: Stephen J. Turnbull
 ;; Keywords: mule, charsets
+;; Created: 2002 January 26
+;; Last-modified: 2002 March 23
 
 ;; This file is part of XEmacs.
 
 ;;; Code:
 
 (provide 'latin-unity-utils)
-(provide 'latin-unity-tables)		; Needed to fake out the require of
-					; latin-unity below.  But not a lie.
+(provide 'latin-unity-tables)	; Not a lie.
 
 ;;; Requires
 (require 'cl)
-(load-library "cl-macs")		; howcum no #'provide?
-(require 'latin-unity)			; for the various variables, especially
-					; tables, indicies, and flags.
-					; #### should split them out to a file
-					; also for ISO 8859/15
-;; the following libraries are from Mule-UCS.
-;; this dependency can be eliminated by providing char-to-ucs.
-(require 'unicode)
-(require 'un-define)
+(load-library "cl-macs")	; howcum no #'provide?
+(require 'latin-unity-latin9)
+;(require 'latin-unity-latin10)	; #### when we have it
+(require 'latin-unity-vars)
+
+(if (fboundp 'character-to-unicode)
+    ;; #### untested
+    (fset 'char-to-ucs 'character-to-unicode)
+  ;; the following libraries are from Mule-UCS.
+  ;; this dependency can be eliminated by providing char-to-ucs.
+  (require 'mule-ucs-unicode "unicode")
+  (require 'un-define))
 
 ;; table of character set support for each Unicode code point
 ;; Table from http://www.cs.tut.fi/~jkorpela/iso8859/charsupp.htm8
   (erase-buffer)
 
   ;; insert preface
-  (insert   ";;; initialize latin-unity-equivalences"
-	  "\n;;; Do not edit -- automatically generated."
-	  "\n(provide 'latin-unity-tables)"
-	  "\n(defconst latin-unity-equivalences"
-	  "\n  (let ((table (make-char-table 'generic)))")
+  (let ((nilvec (make-vector (+ (length latin-unity-character-sets) 2) nil)))
+    (insert ";;; latin-unity-tables.el --- initialize latin-unity-equivalences"
+	    "\n;; Do not edit --- automatically generated."
+	    "\n;; Created: " (format-time-string "%Y %B %d")
+	    "\n(provide 'latin-unity-tables)"
+	    "\n(defconst latin-unity-equivalences"
+	    "\n  (let ((table (make-char-table 'generic)))"
+	    "\n    ;; default all non-Latin charsets"
+    (format "\n    (put-char-table t %s table)"
+	    (progn (aset nilvec 0 0) nilvec))
+            "\n    ;; Control 1 code points are spatial"
+	    "\n    ;; Warning on these is beyond this library's scope."
+    (format "\n    (put-char-table 'control-1 %s table)"
+	    (progn (aset nilvec 0 latin-unity-all-flags) nilvec))))
 
   ;; insert table insertions
   ;; alternate mmc: (format "(apply #'make-char '%s)" (split-char ch))
 		     (if (third x) (format " %d)" (third x)) ")")))))
     (map-char-table
      (lambda (key val)
-       (insert (format "\n    (put-char-table %s (vector %s) table)"
-		       (cond ((characterp key) (mmc key))
-			     ((symbolp key) (format "'%s" key)))
-		       (mapconcat
-			(lambda (elt)
-			  (cond ((characterp elt) (mmc elt))
-				((null elt) "nil")
-				;; be careful to emit read syntax here!
-				((integerp elt) (format "#x%X" elt))
-				(t (format "%s" elt))))
-			val
-			" "))))
+       (when (characterp key)
+	 (insert (format "\n    (put-char-table %s (vector %s) table)"
+			 (mmc key)
+			 (mapconcat
+			  (lambda (elt)
+			    (cond ((characterp elt) (mmc elt))
+				  ((null elt) "nil")
+				  ;; be careful to emit read syntax here!
+				  ((integerp elt) (format "#x%X" elt))
+				  (t (format "%s" elt))))
+			  val
+			  " ")))))
      latin-unity-equivalences))
 
   ;; insert trailing matter
   (insert "\n    table)"
 	  "\n  \"Map a (Latin) Mule character to the set of"
 	  " character sets containing it.\")"
+	  "\n;;; end of latin-unity-tables.el"
 	  "\n")
 
   ;; write the file

File latin-unity-vars.el

 ;; Author: Stephen J. Turnbull
 ;; Keywords: mule, charsets
 ;; Created: 2002 January 26
-;; Last-modified: 2002 March 7
+;; Last-modified: 2002 March 23
 
 ;; This file is part of XEmacs.
 
 ;; determine the list of coding systems which can encode all of the
 ;; characters in the buffer.
 
-;; Provides the 'iso-8859-15 coding system if not yet defined.
-
-;; This file must not contain non-builtin charsets outside of comments,
-;; due to a bug fixed in XEmacs 21.4.7/21.5.7.  For that reason, the Latin-9
-;; language environment is provided in latin-unity-latin9.el.
-
 ;;; Code:
 
 (provide 'latin-unity-vars)
 
+;; Latin-9 charset, ISO 8859/15 coding system, Latin-9 environment
+(require 'latin-unity-latin9)
+
 ;;; User customization is in latin-unity.el
 
-;; define ISO-8859-15 for XEmacs 21.4 and earlier
-;(eval-when (compile load eval)
-;;;###autoload
-(unless (find-charset 'latin-iso8859-15)
-  ;; Create character set
-  (make-charset
-   'latin-iso8859-15 "ISO8859-15 (Latin 9)"
-   '(short-name "Latin-9"
-     long-name "ISO8859-15 (Latin 9)"
-     registry "iso8859-15"
-     dimension 1
-     columns 1
-     chars 96
-     final ?b
-     graphic 1
-     direction l2r))
-  ;; For syntax of Latin-9 characters.
-  (require 'cl)
-  (load-library "cl-macs")		; howcum no #'provide?
-  (loop for c from 64 to 127		; from ',b@(B' to ',b(B'
-    do (modify-syntax-entry (make-char 'latin-iso8859-15 c) "w"))
-  (mapc (lambda (c)
-	  (modify-syntax-entry (make-char 'latin-iso8859-15 c) "w"))
-	'(#xA6 #xA8 #xB4 #xB8 #xBC #xBD #xBE))
-  
-  (modify-syntax-entry (make-char 'latin-iso8859-15 32) "w") ; no-break space
-  (modify-syntax-entry (make-char 'latin-iso8859-15 87) "_") ; multiply
-  (modify-syntax-entry (make-char 'latin-iso8859-15 119) "_") ; divide
-  )
-
-(unless (find-coding-system 'iso-8859-15)
-  ;; Create coding system
-  (make-coding-system
-   'iso-8859-15 'iso2022 "MIME ISO-8859-15"
-   '(charset-g0 ascii
-     charset-g1 latin-iso8859-15
-     charset-g2 t			; grrr
-     charset-g3 t			; grrr
-     mnemonic "MIME/Ltn-9")))
-
 ;; latin-unity-equivalence-table
 ;; could speed things up a tiny bit by splitting out the bit-vector, but
 ;; this is constant-time (a char-table ref plus an aref)
 
 ;;; Variables
 
-(defvar latin-unity-debug nil
+(defcustom latin-unity-debug nil
   "If non-nil, make file write operations as slow as molasses.
-If there were bugs, this might help find them, but there aren't. ;^)")
+If there were bugs, this might help find them, but there aren't. ;^)"
+  :type 'boolean
+  :group 'latin-unity)
 
 (defvar latin-unity-help-buffer " *Coding system conflict*")
 
 (defconst latin-unity-coding-systems
-  `(iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-9
-    ;; if these coding systems are defined, uncomment for latin-unity support
-    ;iso-8859-10			; unsupported in Mule
-    ;iso-8859-13			; unsupported in Mule
-    ;iso-8859-14			; unsupported in Mule
-    iso-8859-15)
+  (let (lucs)
+    (mapc (lambda (x)
+	    (when (find-coding-system x)
+	      (setq lucs (cons x lucs))))
+	  '(iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-9
+	    iso-8859-10 iso-8859-13 iso-8859-14 iso-8859-15 iso-8859-16))
+    (nreverse lucs))
   "List of coding systems \"unified\" by latin-unity.
 
 Cf. `latin-unity-character-sets'.")
 
 (defconst latin-unity-character-sets
-   (append '(latin-iso8859-1 latin-iso8859-2 latin-iso8859-3
-	     latin-iso8859-4 latin-iso8859-9)
-	   (when (memq 'iso-8859-10 latin-unity-coding-systems)
-	     '(latin-iso8859-10))
-	   (when (memq 'iso-8859-13 latin-unity-coding-systems)
-	     '(latin-iso8859-13))
-	   (when (memq 'iso-8859-14 latin-unity-coding-systems)
-	     '(latin-iso8859-14))
-	   '(latin-iso8859-15)
-	   ;; above are all GR sets, below are normally GL
-	   '(ascii latin-jisx0201))
+  (let (lucs)
+    (mapc (lambda (x)
+	    (when (find-charset x)
+	      (setq lucs (cons x lucs))))
+	  '(latin-iso8859-1 latin-iso8859-2 latin-iso8859-3 latin-iso8859-4
+	    latin-iso8859-9 iso-8859-10 iso-8859-13 latin-iso8859-14
+	    latin-iso8859-15 latin-iso8859-16
+	    ;; above are all GR sets, below are normally GL
+	    ascii latin-jisx0201))
+    (nreverse lucs))
   "List of character sets \"unified\" by latin-unity.
 
 \"Unified\" is a misnomer, since actually these character sets are all
 controversial.  It will by default be identified with ASCII, but also
 may take values elsewhere according to user preference.  (Unimplemented.)
 
-The ISO 8859 character sets are actually Latin-1 to Latin-9, the right
-halves of the ISO 8859.
+The ISO 8859 character sets are actually Latin-1 to Latin-10, the right
+halves of the ISO 8859 Latin character sets.
 
 ASCII and Unicode are treated implicitly.  All of the listed character
 sets are the GR of a coded character set that supports ASCII, except
 with the equivalence table.")
 
 (defconst latin-unity-cset-codesys-alist
-  (append '((latin-iso8859-1  . iso-8859-1)
+  (let (lucs)
+    (mapc (lambda (x)
+	    (when (find-coding-system (cdr x))
+	      (setq lucs (cons x lucs))))
+	  '((latin-iso8859-1  . iso-8859-1)
 	    (latin-iso8859-2  . iso-8859-2)
 	    (latin-iso8859-3  . iso-8859-3)
 	    (latin-iso8859-4  . iso-8859-4)
-	    (latin-iso8859-9  . iso-8859-9))
-	  (when (memq 'iso-8859-10 latin-unity-coding-systems)
-	    '((latin-iso8859-10 . iso-8859-10)))
-	  (when (memq 'iso-8859-10 latin-unity-coding-systems)
-	    '((latin-iso8859-13 . iso-8859-13)))
-	  (when (memq 'iso-8859-10 latin-unity-coding-systems)
-	    '((latin-iso8859-14 . iso-8859-14)))
-	  '((latin-iso8859-15 . iso-8859-15)
+	    (latin-iso8859-9  . iso-8859-9)
+	    (latin-iso8859-10 . iso-8859-10)
+	    (latin-iso8859-13 . iso-8859-13)
+	    (latin-iso8859-14 . iso-8859-14)
+	    (latin-iso8859-15 . iso-8859-15)
+	    (latin-iso8859-16 . iso-8859-16)
 	    ;; the following mappings are bogus, the RightThang not clear
-	    (ascii            . t)		; any will do
-	    (latin-jisx0201   . iso2022)))	; need further information
+	    (ascii            . iso-8859-1)	; any will do
+	    (latin-jisx0201   . jisx0201)))	; doesn't currently exist
+    (nreverse lucs))
   "Map Latin charsets to corresponding coding systems or classes.")
 
 ;; bit vectors for checking the feasible character sets

File latin-unity.el

 ;; Author: Stephen J. Turnbull
 ;; Keywords: mule, charsets
 ;; Created: 2002 January 17
-;; Last-modified: 2002 March 14
+;; Last-modified: 2002 March 23
 
 ;; This file is part of XEmacs.
 
 
 
 ;;; Requires
-;; Do NOT require latin-unity-utils; that requires Mule-UCS.
 
-(require 'latin-unity-vars)		; define iso-8859-15
-(require 'latin-unity-latin9)		; uses iso-8859-15
-(require 'latin-unity-tables)
+(require 'latin-unity-vars)
+(require 'latin-unity-latin9)		; define iso-8859-15
+;; #### uncomment when we have ISO 8859/16
+;(require 'latin-unity-latin10)		; define iso-8859-16
+(if (or (fboundp 'character-to-unicode)	; XEmacs  post-21.5.5
+	(fboundp 'char-to-ucs))		; Mule-UCS already loaded
+    (require 'latin-unity-tables "latin-unity-utils")
+  (require 'latin-unity-tables))	; doesn't require Unicode support
 
 
 ;;; User customization

File latin-unity.texi

 @c %**end of header
 
 @c Version values, for easy modification
-@set VERSION 0.9
-@set UPDATED Thursday 2002 March 7
+@set VERSION 1.0
+@set UPDATED Thursday 2002 March 23
 
 @c ** Many people seem to prefer this footenote style
 @footnotestyle end
 character.  @xref{Theory of Operation}.
 
 There are a few variables which determine which coding systems are
-always acceptable to @pkgname{}, @code{latin-unity-ucs-list},
+always acceptable to @pkgname{}:  @code{latin-unity-ucs-list},
 @code{latin-unity-preferred-coding-system-list}, and
 @code{latin-unity-preapproved-coding-system-list}.  The latter two default
 to @code{()}, and should probably be avoided because they short-circuit
 @end menu
 
 
-@c #### need to describe completion features?
 @node Basic Functionality, Interactive Usage, , Usage
 @section Basic Functionality
 
 
 @defun latin-unity-sanity-check begin end filename append visit lockname &optional coding-system
 
-Check if @var{coding-system} can represent all characters between @var{begin} and @var{end}.
+Check if @var{coding-system} can represent all characters between
+@var{begin} and @var{end}.
 
 For compatibility with old broken versions of @code{write-region},
-@var{coding-system} defaults to @code{buffer-file-coding-system}.  @var{filename},
-@var{append}, @var{visit}, and @var{lockname} are ignored.
+@var{coding-system} defaults to @code{buffer-file-coding-system}.
+@var{filename}, @var{append}, @var{visit}, and @var{lockname} are
+ignored.
 
 Return nil if buffer-file-coding-system is not (ISO-2022-compatible)
 Latin.  If @code{buffer-file-coding-system} is safe for the charsets
 mechanism.
 
 This function is intended for use as a @code{write-region-pre-hook}.  It
-does nothing except return @var{coding-system} if @code{write-region} handlers
-are inhibited.
+does nothing except return @var{coding-system} if @code{write-region}
+handlers are inhibited.
 @end defun
 
 
 
 @defun latin-unity-remap-region begin end character-set &optional coding-system
 
-Remap characters between @var{begin} and @var{end} to equivalents in @var{character-set}.
-Optional argument @var{coding-system} may be a coding system name (a symbol) or
-nil.  Characters with no equivalent are left as-is.
+Remap characters between @var{begin} and @var{end} to equivalents in
+@var{character-set}.  Optional argument @var{coding-system} may be a
+coding system name (a symbol) or nil.  Characters with no equivalent are
+left as-is.
 
-When called interactively, @var{begin} and @var{end} are set to the beginning and
-end, respectively, of the active region, and XEmacs prompts for
-@var{character-set}.
+When called interactively, @var{begin} and @var{end} are set to the
+beginning and end, respectively, of the active region, and the function
+prompts for @var{character-set}.  The function does completion, knows
+how to guess a character set name from a coding system name, and also
+provides some common aliases.  See @code{latin-unity-guess-charset}.
+There is no way to specify @var{coding-system}, as it has no useful
+function interactively.
 
-Return @var{coding-system} if @var{coding-system} can encode all characters in the
-region, t if @var{coding-system} is nil and the coding system with G0 = 'ascii
-and G1 = @var{character-set} can encode all characters, and otherwise nil.  Note
-that a non-null return does @emph{not} mean it is safe to write the file, only
-the specified region.  (This behavior is useful for multipart MIME encoding
-and the like.)
-
-Interactively @var{begin} and @var{end} are set to the current region and the function
-prompts for @var{character-set}.  There is no way to specify @var{coding-system}, as it
-has no useful function interactively.
+Return @var{coding-system} if @var{coding-system} can encode all
+characters in the region, t if @var{coding-system} is nil and the coding
+system with G0 = 'ascii and G1 = @var{character-set} can encode all
+characters, and otherwise nil.  Note that a non-null return does
+@emph{not} mean it is safe to write the file, only the specified region.
+(This behavior is useful for multipart MIME encoding and the like.)
 
 Note:  by default this function is quite fascist about universal coding
 systems.  It only admits @samp{utf-8}, @samp{iso-2022-7}, and
 
 @defun latin-unity-recode-region begin end wrong-cs right-cs
 
-Recode characters between @var{begin} and @var{end} from @var{wrong-cs} to @var{right-cs}.
-
-When called interactively, @var{begin} and @var{end} are set to the beginning and
-end, respectively, of the active region, and XEmacs prompts for @var{wrong-cs}
-and @var{right-cs}.
+Recode characters between @var{begin} and @var{end} from @var{wrong-cs}
+to @var{right-cs}.
 
 @var{wrong-cs} and @var{right-cs} are character sets.  Characters retain
 the same code point but the character set is changed.  Only characters
 This function cannot guess which characters you want changed, and which
 should be left alone.
 
+When called interactively, @var{begin} and @var{end} are set to the
+beginning and end, respectively, of the active region, and the function
+prompts for @var{wrong-cs} and @var{right-cs}.  The function does
+completion, knows how to guess a character set name from a coding system
+name, and also provides some common aliases.  See
+@code{latin-unity-guess-charset}.
+
 Another way to accomplish this, but using coding systems rather than
 character sets to specify the desired recoding, is
 @samp{latin-unity-recode-coding-region}.  That function may be faster
 
 @defun latin-unity-recode-coding-region begin end wrong-cs right-cs
 
-Recode text between @var{begin} and @var{end} from @var{wrong-cs} to @var{right-cs}.
+Recode text between @var{begin} and @var{end} from @var{wrong-cs} to
+@var{right-cs}.
 
-When called interactively, @var{begin} and @var{end} are set to the beginning and
-end, respectively, of the active region, and XEmacs prompts for @var{wrong-cs}
-and @var{right-cs}.
+@var{wrong-cs} and @var{right-cs} are coding systems.  Characters retain
+the same code point but the character set is changed.  The identity of
+characters may change.  This is an inherently dangerous function;
+multilingual text may be recoded in unexpected ways.  #### It's also
+dangerous because the coding systems are not sanity-checked in the
+current implementation.
 
-@var{wrong-cs} and @var{right-cs} are coding systems.  Characters retain the same code
-point but the character set is changed.  The identity of characters may change.
-This is an inherently dangerous function; multilingual text may be recoded in
-unexpected ways.  #### It's also dangerous because the coding systems are not
-sanity-checked in the current implementation.
+When called interactively, @var{begin} and @var{end} are set to the
+beginning and end, respectively, of the active region, and the function
+prompts for @var{wrong-cs} and @var{right-cs}.  The function does
+completion, knows how to guess a coding system name from a character set
+name, and also provides some common aliases.  See
+@code{latin-unity-guess-coding-system}.
 
 Another, safer, way to accomplish this, using character sets rather than coding
 systems to specify the desired recoding, is to use `latin-unity-recode-region.