Anonymous avatar Anonymous committed 39baf07

Integrate Mule-UCS and latin-unity with the new latin-euro-standards
package.

Comments (0)

Files changed (8)

 # Makefile for latin-unity
 
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 
 # This file is part of XEmacs.
 
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-# Last-modified: 2002 October 24
+# Last-modified: 2005 February 7
 
 # The XEmacs CVS version is canonical.  Keep versions n'sync.
-VERSION = 1.10
+VERSION = 1.11
 AUTHOR_VERSION = $(VERSION)
 MAINTAINER = Stephen J. Turnbull <stephen@xemacs.org>
 PACKAGE = latin-unity
 
 # The Mule-UCS, leim, and fsf-compat requires will go away at some point
 ifeq ($(wildcard ../mule-ucs),)
-REQUIRES = mule-base leim fsf-compat dired
+REQUIRES = mule-base latin-euro-standards leim fsf-compat dired
 else
-REQUIRES = mule-base mule-ucs leim fsf-compat dired
+REQUIRES = mule-base latin-euro-standards mule-ucs leim fsf-compat dired
 endif
 
 # Latin-Unity is a unique package in that it does not compile or run
        latin-unity-latin8.elc latin-unity-latin10.elc \
        latin-unity-utils.elc
 
+
 EXTRA_SOURCES = latin-unity-tests.el latin-unity-tables.el
 
 # for defvars and creation of ISO 8859/13 and ISO 8859/15 charsets and
 # coding system
-PRELOADS=-l cl-macs -l latin-unity-latin7.el -l latin-unity-latin9.el \
+PRELOADS=-l cl-macs \
          -l latin-unity-vars.el
 
 STANDARD_DOCS = t

latin-unity-latin10.el

 ;; Author: Stephen J. Turnbull
 ;; Keywords: mule, charsets
 ;; Created: 2002 October 24
+;; Last-Modified: 2005 February 7
 
 ;; This file is part of XEmacs.
 
 
 ;;; Code:
 
-;; define ISO-8859-16 for XEmacs 21.4 and earlier
-;;;###autoload
-(unless (find-charset 'latin-iso8859-16)
-  ;; Create character set
-  (make-charset
-   'latin-iso8859-16 "ISO8859-16 (Latin 10)"
-   ;; sheesh, what we do for backward compatibility
-   ;; #### this test and the similar one below probably should be
-   ;; reformulated to use condition-case
-   (append (if (emacs-version>= 21 4)
-	       '(short-name "Latin-10"
-		 long-name "ISO8859-16 (Latin 10)")
-	     nil)
-	   '(registry "iso8859-16"
-	     dimension 1
-	     columns 1
-	     chars 96
-	     final ?f			; octet 06/06; cf ISO-IR 226
-	     graphic 1
-	     direction l2r)))
-  ;; For syntax of Latin-10 characters.
-  (require 'cl)
-  (load "cl-macs" nil t)
-  (loop for c from 64 to 127
-    do (modify-syntax-entry (make-char 'latin-iso8859-16 c) "w"))
-  (mapc (lambda (c)
-	  (modify-syntax-entry (make-char 'latin-iso8859-16 c) "w"))
-	'(#xA1 #xA2 #xA3 #xA6 #xA8 #xAA #xAC #xAE #xAF
-	  #xB3 #xB4 #xB5 #xB8 #xB9 #xBA #xBC #xBD #xBE #xBF))
-  )
+;;; Actual functionality has been moved to the latin-euro-standards package,
+;;; to prevent a circular dependency for Mule-UCS. This is a compatibility
+;;; stub. -- Aidan Kehoe, Mon Feb 7 20:18:03 CET 2005
 
-;;;###autoload
-(unless (find-coding-system 'iso-8859-16)
-  ;; Create coding system
-  (make-coding-system
-   'iso-8859-16 'iso2022 "MIME ISO-8859-16"
-   '(charset-g0 ascii
-     charset-g1 latin-iso8859-16
-     charset-g2 t			; grrr
-     charset-g3 t			; grrr
-     mnemonic "MIME/Ltn-10")))
+(require 'latin-euro-standards)
 
-;;;###autoload
-(unless (assoc "Latin-10" language-info-alist)
-  (defun setup-latin10-environment ()
-    "Set up multilingual environment (MULE) for European Latin-10 users."
-    (interactive)
-    (set-language-environment "Latin-10"))
+;; Check that we're functionally equivalent to the old latin-unity-latin10.el
 
-  ;; sheesh, what we do for backward compatibility
-  (apply #'set-language-info-alist
-	 (append `("Latin-10"
-		   ((charset ascii latin-iso8859-16)
-		    (coding-system iso-8859-16)
-		    (coding-priority iso-8859-16)
-		    (input-method . "latin-10-prefix")
-		    (sample-text
-		     .
-		     ;; #### OK, who knows some Romanian?
-		     ,(format "\
-Hey, if you know Romanian, send sample encoded text (eg, using \"comma-below\"
-characters) to xemacs-beta@xemacs.org.  Please use a MIME
-application/octet-stream attachment if possible."
-			      ))
-		    (documentation . "\
-This is a generic language environment for Latin-10 (ISO-8859-16).  It
-supports Romanian and most Western European languages.")))
-		 (if (emacs-version>= 21 1 15)
-		     '(("European"))
-		   nil))))
+;; The character set should exist.
+(assert (charsetp (find-charset 'latin-iso8859-16))
+	"`latin-euro-standards' didn't provide a Latin 10 character set!")
+
+;; As should the coding system.
+(assert (coding-system-p (find-coding-system 'iso-8859-16))
+	"`latin-euro-standards' didn't provide a Latin 10 coding system!")
+	
+;; And we should have a language environment. 
+(assert 
+ (assoc "Latin-10" language-info-alist)
+ "`latin-euro-standards' didn't provide a Latin 10 language environment!")
 
 (provide 'latin-unity-latin10)
 

latin-unity-latin7.el

 ;; Author: Stephen J. Turnbull
 ;; Keywords: mule, charsets
 ;; Created: 2002 March 7
-;; Last-modified: 2002 March 23
+;; Last-modified: 2005 February 7
 
 ;; This file is part of XEmacs.
 
 
 ;;; Code:
 
-;; define ISO-8859-13 for XEmacs 21.4 and earlier
-; don't ;;;###autoload
-(unless (find-charset 'latin-iso8859-13)
-  ;; Create character set
-  (make-charset
-   'latin-iso8859-13 "ISO8859-13 (Latin 7)"
-   ;; sheesh, what we do for backward compatibility
-   ;; #### this test and the similar one below probably should be
-   ;; reformulated to use condition-case
-   (append (if (emacs-version>= 21 4)
-	       '(short-name "Latin-7"
-		 long-name "ISO8859-13 (Latin 7)")
-	     nil)
-	   '(registry "iso8859-13"
-	     dimension 1
-	     columns 1
-	     chars 96
-	     final ?Y
-	     graphic 1
-	     direction l2r)))
-  ;; For syntax of Latin-7 characters.
-  (require 'cl)
-  (load "cl-macs" nil t)		; howcum no #'provide?
-  (loop for c from 64 to 127		; from '�' to '�'
-    do (modify-syntax-entry (make-char 'latin-iso8859-13 c) "w"))
-  (mapc (lambda (c)
-	  (modify-syntax-entry (make-char 'latin-iso8859-13 c) "w"))
-	'(#xA8 #xAA #xAF #xB8 #xBA #xBF))
-  
-  (modify-syntax-entry (make-char 'latin-iso8859-13 32) "w") ; no-break space
-  (modify-syntax-entry (make-char 'latin-iso8859-13 87) "_") ; multiply
-  (modify-syntax-entry (make-char 'latin-iso8859-13 119) "_") ; divide
-  (modify-syntax-entry (make-char 'latin-iso8859-13 127) ".") ; right squote
-  )
+;;; Actual functionality has been moved to the latin-euro-standards package,
+;;; to prevent a circular dependency for Mule-UCS. This is a compatibility
+;;; stub. -- Aidan Kehoe, Mon Feb 7 20:18:03 CET 2005
 
-(defvar iso8859/13-case-table
-  (let ((table (copy-case-table (standard-case-table))))
-    (mapc (lambda (pair)
-	    (put-case-table-pair (make-char 'latin-iso8859-13 (car pair))
-				 (make-char 'latin-iso8859-13 (cdr pair))
-				 table))
-	  '((#xA8 . #xB8) (#xAA . #xBA) (#xAF . #xBF)))
-    (let ((i #xC0))
-      (while (< i #xDF)
-	(unless (= i #xD7)
-	    (put-case-table-pair (make-char 'latin-iso8859-13 i)
-				 (make-char 'latin-iso8859-13 (+ i #x20))
-				 table))
-	(setq i (1+ i))))	  
-    table)
-  "Case table for Latin 7, right half of ISO 8859/13.")
+(require 'latin-euro-standards)
 
-; don't ;;;###autoload
-(unless (find-coding-system 'iso-8859-13)
-  ;; Create coding system
-  (make-coding-system
-   'iso-8859-13 'iso2022 "MIME ISO-8859-13"
-   '(charset-g0 ascii
-     charset-g1 latin-iso8859-13
-     charset-g2 t			; grrr
-     charset-g3 t			; grrr
-     mnemonic "MIME/Ltn-7")))
+;; Check that we're functionally equivalent to the old latin-unity-latin7.el
 
-; don't ;;;###autoload
-(unless (assoc "Latin-7" language-info-alist)
-  (defun setup-latin7-environment ()
-    "Set up multilingual environment (MULE) for Baltic Rim Latin-7 users."
-    (interactive)
-    (set-language-environment "Latin-7"))
+;; The character set should exist.
+(assert (charsetp (find-charset 'latin-iso8859-13))
+	"`latin-euro-standards' didn't provide a Latin 7 character set!")
 
-  ;; sheesh, what we do for backward compatibility
-  (apply #'set-language-info-alist
-	 (append `("Latin-7"
-		   ((charset ascii latin-iso8859-13)
-		    (coding-system iso-8859-13)
-		    (coding-priority iso-8859-13)
-		    (input-method . "latin-7-prefix")
-		    (sample-text
-		     .
-		     ,(format "\
-Hello, Hej, Tere, Hei, Bonjour, Gr%c%c Gott, Ciao, %cHola!"
-			      ;; SMALL U WITH UMLAUT
-			      (make-char 'latin-iso8859-13 #x7C)
-			      ;; GERMAN SHARP S
-			      (make-char 'latin-iso8859-13 #x5F)
-			      ;; INVERTED EXCLAMATION MARK
-			      (make-char 'latin-iso8859-13 #x21)))
-		    (documentation . "\
-This is a generic language environment for Latin-7 (ISO-8859-13).  It
-supports the Baltic Rim languages.")))
-		 (if (emacs-version>= 21 1 15)
-		     '(("Baltic Rim"))
-		   nil))))
+;; As should the coding system.
+(assert (coding-system-p (find-coding-system 'iso-8859-13))
+	"`latin-euro-standards' didn't provide a Latin 7 coding system!")
+	
+;; And we should have a language environment. 
+(assert 
+ (assoc "Latin-7" language-info-alist)
+ "`latin-euro-standards' didn't provide a Latin 7 language environment!")
 
 (provide 'latin-unity-latin7)
 

latin-unity-latin8.el

 ;; Author: Stephen J. Turnbull
 ;; Keywords: mule, charsets
 ;; Created: 2002 October 24
+;; Last-Modified: 2005 February 7
 
 ;; This file is part of XEmacs.
 
 
 ;;; Code:
 
-;; define ISO-8859-14 for XEmacs 21.4 and earlier
-;;;###autoload
-(unless (find-charset 'latin-iso8859-14)
-  ;; Create character set
-  (make-charset
-   'latin-iso8859-14 "ISO8859-14 (Latin 8)"
-   ;; sheesh, what we do for backward compatibility
-   ;; #### this test and the similar one below probably should be
-   ;; reformulated to use condition-case
-   (append (if (emacs-version>= 21 4)
-	       '(short-name "Latin-8"
-		 long-name "ISO8859-16 (Latin 8)")
-	     nil)
-	   '(registry "iso8859-14"
-	     dimension 1
-	     columns 1
-	     chars 96
-	     final ?_			; octet 05/15; cf ISO-IR 199
-	     graphic 1
-	     direction l2r)))
-  ;; For syntax of Latin-8 characters.
-  (require 'cl)
-  (load "cl-macs" nil t)
-  (loop for c from 32 to 127
-    do (modify-syntax-entry (make-char 'latin-iso8859-14 c) "w"))
-  (mapc (lambda (c)
-	  (modify-syntax-entry (make-char 'latin-iso8859-14 c) "_"))
-	'(#xA3 #xA7 #xA9 #xAD #xAE #xB6))
-  )
+;;; Actual functionality has been moved to the latin-euro-standards package,
+;;; to prevent a circular dependency for Mule-UCS. This is a compatibility
+;;; stub. -- Aidan Kehoe, Mon Feb 7 20:18:03 CET 2005
 
-;;;###autoload
-(unless (find-coding-system 'iso-8859-14)
-  ;; Create coding system
-  (make-coding-system
-   'iso-8859-14 'iso2022 "MIME ISO-8859-14"
-   '(charset-g0 ascii
-     charset-g1 latin-iso8859-14
-     charset-g2 t			; grrr
-     charset-g3 t			; grrr
-     mnemonic "MIME/Ltn-8")))
+(require 'latin-euro-standards)
 
-;;;###autoload
-(unless (assoc "Latin-8" language-info-alist)
-  (defun setup-latin8-environment ()
-    "Set up multilingual environment (MULE) for European Latin-8 users."
-    (interactive)
-    (set-language-environment "Latin-8"))
+;; Check that we're functionally equivalent to the old latin-unity-latin8.el
 
-  ;; sheesh, what we do for backward compatibility
-  (apply #'set-language-info-alist
-	 (append `("Latin-8"
-		   ((charset ascii latin-iso8859-14)
-		    (coding-system iso-8859-14)
-		    (coding-priority iso-8859-14)
-		    (input-method . "latin-8-prefix")
-		    (sample-text
-		     .
-		     ;; #### OK, who knows some Gaelic?
-		     ,(format "\
-Hey, if you know a Celtic language, send sample encoded text (eg, using
-\"dot-above\" characters) to xemacs-beta@xemacs.org.  Please use a MIME
-application/octet-stream attachment if possible."
-			      ))
-		    (documentation . "\
-This is a generic language environment for Latin-8 (ISO-8859-14).  It
-supports Celtic and most Western European languages.")))
-		 (if (emacs-version>= 21 1 15)
-		     '(("European"))
-		   nil))))
+;; The character set should exist.
+(assert (charsetp (find-charset 'latin-iso8859-14))
+	"`latin-euro-standards' didn't provide a Latin 8 character set!")
+
+;; As should the coding system.
+(assert (coding-system-p (find-coding-system 'iso-8859-14))
+	"`latin-euro-standards' didn't provide a Latin 8 coding system!")
+	
+;; And we should have a language environment. 
+(assert 
+ (assoc "Latin-8" language-info-alist)
+ "`latin-euro-standards' didn't provide a Latin 8 language environment!")
 
 (provide 'latin-unity-latin8)
 

latin-unity-latin9.el

 
 ;;; 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)"
-   ;; sheesh, what we do for backward compatibility
-   ;; #### this test and the similar one below probably should be
-   ;; reformulated to use condition-case
-   (append (if (emacs-version>= 21 4)
-	       '(short-name "Latin-9"
-		 long-name "ISO8859-15 (Latin 9)")
-	     nil)
-	   '(registry "iso8859-15"
-	     dimension 1
-	     columns 1
-	     chars 96
-	     final ?b
-	     graphic 1
-	     direction l2r)))
-  ;; For syntax of Latin-9 characters.
-  (require 'cl)
-  (load "cl-macs" nil t)		; howcum no #'provide?
-  (loop for c from 64 to 127		; from '�' to '�'
-    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
-  )
+;;; Actual functionality has been moved to the latin-euro-standards package,
+;;; to prevent a circular dependency for Mule-UCS. This is a compatibility
+;;; stub. -- Aidan Kehoe, Mon Feb 7 20:18:03 CET 2005
 
-;;;###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")))
+(require 'latin-euro-standards)
 
-;;;###autoload
-(unless (assoc "Latin-9" language-info-alist)
-  (defun setup-latin9-environment ()
-    "Set up multilingual environment (MULE) for European Latin-9 users."
-    (interactive)
-    (set-language-environment "Latin-9"))
+;; Check that we're functionally equivalent to the old latin-unity-latin9.el
 
-  ;; sheesh, what we do for backward compatibility
-  (apply #'set-language-info-alist
-	 (append `("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"
-			      ;; SMALL U WITH UMLAUT
-			      (make-char 'latin-iso8859-15 #x7C)
-			      ;; GERMAN SHARP S
-			      (make-char 'latin-iso8859-15 #x5F)
-			      ;; INVERTED EXCLAMATION MARK
-			      (make-char 'latin-iso8859-15 #x21)
-			      ;; EURO SIGN
-			      (make-char 'latin-iso8859-15 #x24)))
-		    (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\".")))
-		 (if (emacs-version>= 21 1 15)
-		     '(("European"))
-		   nil))))
+;; The character set should exist.
+(assert (charsetp (find-charset 'latin-iso8859-16))
+	"`latin-euro-standards' didn't provide a Latin 9 character set!")
 
-;; #### move these to a separate file for keysyms.
-;; I think these are all the ones not in Latin-1.
-
-;;;###autoload
-(flet ((define-keysym-as-char (keysym character)
-	 (unless (lookup-key global-map (vector keysym))
-	   (define-key global-map (vector keysym) #'self-insert-command))
-	 (unless (get keysym 'ascii-character)
-	   (put keysym 'ascii-character character)))
-       (foo (k o)
-	 (define-keysym-as-char k (make-char 'latin-iso8859-15 o))))
-  (foo 'EuroSign   #x24)
-  (foo 'Scaron     #x26)
-  (foo 'scaron     #x28)
-  (foo 'Zcaron     #x34)
-  (foo 'zcaron     #x38)
-  (foo 'OE         #x3C)
-  (foo 'oe         #x3D)
-  (foo 'Ydiaeresis #x3E))
-
+;; As should the coding system.
+(assert (coding-system-p (find-coding-system 'iso-8859-15))
+	"`latin-euro-standards' didn't provide a Latin 9 coding system!")
+	
+;; And we should have a language environment. 
+(assert 
+ (assoc "Latin-9" language-info-alist)
+ "`latin-euro-standards' didn't provide a Latin 9 language environment!")
 
 (provide 'latin-unity-latin9)
 

latin-unity-vars.el

 
 (provide 'latin-unity-vars)
 
-;; If you consider any of these bloat, you can comment them out, but
-;; YOU MUST REGENERATE latin-unity-tables.el.  The table and the code
-;; depend on arbitrarily chosen indexes for the charsets.
-
-;; Latin-7 charset, ISO 8859/13 coding system, Latin-7 environment (Baltic Rim)
-;; Few people will need this, but it avoids screwups.
-(require 'latin-unity-latin7)
-
-;; Latin-8 charset, ISO 8859/14 coding system, Latin-8 environment (Celtic)
-;; Few people will need this, but it avoids screwups.
-(require 'latin-unity-latin8)
-
-;; Latin-9 charset, ISO 8859/15 coding system, Latin-9 environment (Euro)
-(require 'latin-unity-latin9)
-
-;; Latin-10 charset, ISO 8859/16 coding system, Latin-10 environment (Romanian)
-;; Few people will need this, but it avoids screwups.
-(require 'latin-unity-latin10)
+;; Load the latin{7,8,9,10} language environments, character sets, and
+;; coding systems.
+(require 'latin-euro-standards)
 
 ;;; User customization is in latin-unity.el
 
 ;;; Requires
 
 (require 'latin-unity-vars)
-(require 'latin-unity-latin7)		; define iso-8859-13
-;; uncomment to add support for ISO 8859/14
-;(require 'latin-unity-latin8)		; define iso-8859-14
-(require 'latin-unity-latin9)		; define iso-8859-15
-;; uncomment to add support for 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")
 @c %**end of header
 
 @c Version values, for easy modification
-@set VERSION 1.0
-@set UPDATED Thursday 2002 March 23
+@set VERSION 1.1
+@set UPDATED Monday, February 7, 2005
 
 @c ** Many people seem to prefer this footenote style
 @footnotestyle end
 @node Interfaces, Charsets and Coding Systems, What latin-unity Cannot Do for You, Top
 @chapter Interfaces
 
-The Latin-9 language environment is provided in
-@file{latin-unity-latin9.el}.  This file when compiled contains Latin 9
-characters, so you @strong{must} load @file{latin-unity-vars.el} first
-to define those characters.  Otherwise the Lisp reader is likely to
-signal an error due to stray ISO 2022 control sequences.
-
-Similar considerations apply to @file{latin-unity-latin7.el},
-@file{latin-unity-latin8.el} and @file{latin-unity-latin10.el}.
-
-Sorry, that's all I have to say for now---but it's important!
+Various recent---dating from the end of the nineties---ISO 8859 standard
+language environments used to be provided with this package, but they
+have been refactored out into their own package,
+@i{latin-euro-standards}, on which this one depends. See the
+documentation for that package if you're interested in using those from
+Lisp.
 
 @node Charsets and Coding Systems, Internals, Interfaces, Top
 @chapter Charsets and Coding Systems
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.