Commits

Anonymous committed 57dbe9a

long-awaited update <87sme3qvg7.fsf@tleepslib.sk.tsukuba.ac.jp>

  • Participants
  • Parent commits 53860c1

Comments (0)

Files changed (7)

 a larger character set.  This package provides functions to determine
 the list of coding systems which can encode all of the characters in
 the buffer, and translate to a common coding system.  It also provides
-Latin-7 and Latin-9 charsets, coding systems, and input methods.
+Latin-7 and Latin-9 charsets, coding systems, and input methods (including
+some common X11 keysyms for the EuroSign).
+2004-05-14  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* latin-unity.el: Add requires for Latin8 & Latin-10 (commented
+	out).
+	(latin-unity-example): Change to hexademical notation.
+	(latin-unity-sanity-check): Add comment on refactoring.
+
+	* latin-unity-tests.el: Label all non-ASCII characters.  Change
+	code points to hexadecimal for ease of consulting tables.
+
+	* README: Various updates, mostly related to Latin-9 and Latin-10.
+
+	* FAQ: Add title line.
+
+2004-03-18  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* BLURB: Mention EuroSign.
+
+2003-10-24  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* latin-unity.el (latin-unity-hack-cookies-last-page):
+	(latin-unity-hack-cookies-prop-line):
+	(latin-unity-hack-coding-cookie):
+	Move coding cookie count checks to `latin-unity-hack-coding-cookie'.
+
+	* latin-unity.texi: Fix the permission notice.  :-(
+	
+	* latin-unity-latin9.el (flet foo): Remove redundant parens and
+	bogus coding cookie.  Add keysyms for some Latin-9 characters.
+
+	* latin-unity.el (latin-unity-hack-cookies-prop-line): Do a better
+	job of parsing prop line.
+
 2003-11-09  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.09 released.
 ***** Features:
 
   o If a buffer contains only ASCII and ISO-8859 Latin characters, the
-    buffer can be "unified", that is treated so that all characters are
-    translated to one charset that includes them all.  If the current
-    buffer coding system is not sufficient, the package will suggest
-    alternatives.  It prefers ISO-8859 encodings, but also suggests
-    UTF-8 (if available; 21.4+ feature, currently requires Mule-UCS),
-    ISO 2022 7-bit, or X Compound Text if no ISO 8859 coding system is
-    comprehensive enough.
+    buffer can be "unified", that is treated so that all characters
+    are translated to one charset that includes them all.  If the
+    current buffer coding system is not sufficient, the package will
+    suggest alternatives.  It prefers ISO-8859 encodings, but also
+    suggests UTF-8 (if available; 21.4+ feature, currently requires
+    Mule-UCS for 21.4 versions), ISO 2022 7-bit, or X Compound Text
+    if no ISO 8859 coding system is comprehensive enough.
 
     It allows the user to use other coding systems, and the list of
     suggested coding systems is Customizable.
     'latin-unity-latin7)' and `(require 'latin-latin7-input)', and not
     do `(latin-unity-install)'.
 
+  o ISO 8859/14 for XEmacs 21.4 and 21.1 (both untested).
+    To get 'iso-8859-14 preferred to 'iso-8859-1 in autodetection, use
+    (set-coding-category-system 'iso-8-1 'iso-8859-14).  (untested)
+    Alternatively set language environment to Latin-8.
+
+    If all you want is ISO 8859/14 support, you can `(require
+    'latin-unity-latin8)', and not do `(latin-unity-install)'.
+    Latin-8 does not yet have an input method.
+
   o ISO 8859/15 for XEmacs 21.4 (moderately tested) and 21.1 (lightly
-    tested), including binding the EuroSign keysym to ISO 8859/15 0xA4.
-    To get 'iso-8859-15 preferred to 'iso-8859-1 in autodetection, use
+    tested), including binding the EuroSign keysym to ISO 8859/15 0xA4
+    (as well as the other "new" keysyms needed for ISO 8859/15).  To
+    get 'iso-8859-15 preferred to 'iso-8859-1 in autodetection, use
     (set-coding-category-system 'iso-8-1 'iso-8859-15).  (untested)
     Alternatively set language environment to Latin-9.
 
     'latin-unity-latin9)' and `(require 'latin-euro-input)', and not
     do `(latin-unity-install)'.
 
+  o ISO 8859/16 for XEmacs 21.4 and 21.1 (both untested).
+    To get 'iso-8859-16 preferred to 'iso-8859-1 in autodetection, use
+    (set-coding-category-system 'iso-8-1 'iso-8859-16).  (untested)
+    Alternatively set language environment to Latin-10.
+
+    If all you want is ISO 8859/16 support, you can `(require
+    'latin-unity-latin10)', and not do `(latin-unity-install)'.
+    Latin-10 does not yet have an input method.
+
   o Hooks into `write-region' to prevent (or at least drastically
     reduce the probability of) introduction of ISO 2022 escape
     sequences for "foreign" character sets.  This hook is not set by
     usual install, configure, and operating instructions.
 
   o latin-unity itself depends only on mule-base in operation.  Table
-    generation depends on Unicode support such as Mule-UCS or Ben's
-    ben-mule-21-5 workspace, and the package build currently requires
-    Mule-UCS.  The input method depends on LEIM and fsf-compat.
+    generation depends on Unicode support such as Mule-UCS or XEmacs
+    >= 21.5.6, and the package build currently requires Mule-UCS.  The
+    input method depends on LEIM and fsf-compat.
 
 Current misfeatures:
 
+  o Needs to be refactored so that automatic tests of functionality
+    currently buried in interactive functions can be written.  See
+    comment on `latin-unity-sanity-check'.
+
   o Doesn't automatically save pure ASCII files in ASCII superset
     encodings like iso-2022-jp.  Workaround:  put an ISO 8859 coding
     system in `latin-unity-preapproved-coding-system-list'.
     there is no way to autoload a charset.  (Can't be fixed without
     changing XEmacs core.)
 
-Planned, mostly near future:
+Planned, sooner or later:
 
   o Fix the misfeatures.
 
   o Fix JIS Roman (as an alternative to ASCII) support.
 
-  o Support Latin-10 (ISO 8859/16) and maybe others.
-
   o More UI features (like highlighting unrepresentable chars in buffer).
 
   o Integration to development tree (but probably not 21.4, this
 
 latin-latin7-input.el contains a Quail input method for Latin 7.
 
+latin-unity-latin8.el defines ISO 8859/14 and the Latin-8 environment.
+
 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-latin10.el defines ISO 8859/16 and the Latin-10 environment.
+
+(Latin-8 and Latin-10 do not have input methods yet.)
+
 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.  Used only when

File latin-unity-latin9.el

-;;; latin-unity-latin9.el --- Define language environment -*- coding: iso-2022-7 -*-
+;;; latin-unity-latin9.el --- Define language environment
 
-;; Copyright (C) 2002 Free Software Foundation, Inc
+;; Copyright (C) 2002, 2003 Free Software Foundation, Inc
 
 ;; Author: Stephen J. Turnbull
 ;; Keywords: mule, charsets
 ;; Created: 2002 March 7
-;; Last-modified: 2002 March 23
+;; Last-modified: 2003 August 9
 
 ;; This file is part of XEmacs.
 
   ;; For syntax of Latin-9 characters.
   (require 'cl)
   (load "cl-macs" nil t)		; howcum no #'provide?
-  (loop for c from 64 to 127		; from ',A@(B' to ',A(B'
+  (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"))
 		   nil))))
 
 ;; #### move these to a separate file for keysyms.
+;; I think these are all the ones not in Latin-1.
 
 ;;;###autoload
-(unless (lookup-key global-map [EuroSign])
-  (define-key global-map [EuroSign] #'self-insert-command))
+(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))
 
-;;;###autoload
-(unless (get 'EuroSign 'ascii-character)
-  (put 'EuroSign 'ascii-character (make-char 'latin-iso8859-15 #x24)))
 
 (provide 'latin-unity-latin9)
 

File latin-unity-tests.el

 	       (list 'iso-8859-1 'iso-8859-15
 		     (format "test accentu%c, avec %curo."
 			     ;; LATIN SMALL LETTER E WITH ACUTE 
-			     (make-char 'latin-iso8859-1 #x69)
+			     (make-char 'latin-iso8859-1 #xE9)
 			     ;; EURO SIGN
-			     (make-char 'latin-iso8859-15 #x24)))
+			     (make-char 'latin-iso8859-15 #xA4)))
 	       ;; We had problems with plain Latin-1 :-(
 	       (list 'iso-8859-1 'iso-8859-1
 		     (format "Ville Skytt%c  <ville.skytta@xemacs.org>"
 			     ;; LATIN SMALL LETTER A WITH DIAERESIS
-			     (make-char 'latin-iso8859-1 #x64)))
+			     (make-char 'latin-iso8859-1 #xE4)))
 	       (list 'iso-8859-1 'iso-8859-2
 		     (format "f%cr Hrvoje Nik%ci%c"
 			     ;; LATIN SMALL LETTER U WITH DIAERESIS
-			     (make-char 'latin-iso8859-1 #x7C)
+			     (make-char 'latin-iso8859-1 #xFC)
 			     ;; LATIN SMALL LETTER S WITH CARON
-			     (make-char 'latin-iso8859-2 57)
+			     (make-char 'latin-iso8859-2 #xB9)
 			     ;; LATIN SMALL LETTER C WITH ACUTE
-			     (make-char 'latin-iso8859-2 102)))
+			     (make-char 'latin-iso8859-2 #xE6)))
 	       (list 'iso-8859-1 'utf-8
 		     (format "f%cr Hrvoje, %cclept Nik%ci%c"
+			     ;; LATIN SMALL LETTER U WITH DIAERESIS
 			     (make-char 'latin-iso8859-1 #xFC)
-			     (make-char 'latin-iso8859-1 255)
-			     (make-char 'latin-iso8859-2 57)
 			     ;; LATIN SMALL LETTER Y WITH DIAERESIS
-			     (make-char 'latin-iso8859-2 102)))
+			     (make-char 'latin-iso8859-1 #xFF)
+			     ;; LATIN SMALL LETTER S WITH CARON
+			     (make-char 'latin-iso8859-2 #xB9)
+			     ;; LATIN SMALL LETTER C WITH ACUTE ACCENT
+			     (make-char 'latin-iso8859-2 #xE6)))
 	       )
 	     ))
 

File latin-unity.el

 ;; Author: Stephen J. Turnbull
 ;; Keywords: mule, charsets
 ;; Created: 2002 January 17
-;; Last-modified: 2002 March 23
+;; Last-modified: 2003 August 9
 
 ;; This file is part of XEmacs.
 
 
 (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 when we have ISO 8859/16
+;; 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
     regrets-only  never change it, warn that coding system is inappropriate
     warn          always change it, warn user of change
     ask           ask user's permission."
-  ;; #### really should not have to have the list above and :doc strings
   :type '(choice
 	  (const nil  :doc "never change, return silently")
 	  (const t    :doc "always change, return silently")
 ;; FILENAME, VISIT, or LOCKNAME could be used to default the coding system,
 ;; but this would conflict with the semantics of `write-region'.
 ;; #### The efficiency of this function can clearly be improved.
-;; #### Maybe this function should have a no-ask for the sake of testing?
+;; #### This function should be set up to call the check functions in a
+;; condition-case, and call out to error handlers.  Then tests could be
+;; written more easily.
 
 ;;;###autoload
 (defun latin-unity-sanity-check (begin end filename append visit lockname
 ;; ripp'd untimely from the hack-local-variables-* stuff in files.el.
 
 ;; #### probably this function should be hacked like the prop-line version
+;; #### possibly this function should error on syntax errors (this doesn't
+;;      prevent loading the file, but does prevent saving it)
 (defun latin-unity-hack-cookies-last-page (&optional force)
   "Find a coding cookie in the local variables block on the last page.
 Warn that XEmacs doesn't support coding cookies there.
     (save-restriction
       (widen)
       (goto-char (point-max))
-      (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move)
+      (search-backward "
       (when (let ((case-fold-search t))
-	      (search-forward "Local Variables:" nil t))
+	      (and (search-forward "\\<Local Variables:" nil t)
+		   (if (not (search-forward "\\<Local Variables:" nil t))
+		       t
+		     (warn "Two local variables sections found, ignoring.")
+		     nil)))
 	(let ((continue t)
-	      prefix prefixlen suffix start)
+	      problems prefix prefixlen suffix)
 	  ;; The prefix is what comes before "local variables:" in its line.
 	  ;; The suffix is what comes after "local variables:" in its line.
+	  ;; Whitespace immediately preceding "local variables:" _is_ part
+	  ;; of prefix; whitespace immediately following "local variables:"
+	  ;; _is not_ part of suffix.  This means that you can have more
+	  ;; indentation than "local variables:" has, but not less, while
+          ;; you can pad the suffix with whitespace for nice alignment.
 	  (skip-chars-forward " \t")
 	  (or (eolp)
 	      (setq suffix (buffer-substring (point)
 	  (if suffix (setq suffix (concat (regexp-quote suffix) "$")))
 	  (while continue
 	    ;; Look at next local variable spec.
-	    (if selective-display (re-search-forward "[\n\C-m]")
+	    (if selective-display
+		(re-search-forward "[\n\C-m]")
 	      (forward-line 1))
 	    ;; Skip the prefix, if any.
 	    (if prefix
 		(if (looking-at prefix)
 		    (forward-char prefixlen)
-		  (warn "Local variables entry is missing the prefix")))
+		  (setq problems
+			(list "Local variables entry is missing the prefix"))))
 	    ;; Find the variable name; strip whitespace.
 	    (skip-chars-forward " \t")
-	    (setq start (point))
-	    (skip-chars-forward "^:\n")
-	    (if (eolp) (warn "Missing colon in local variables entry"))
-	    (skip-chars-backward " \t")
-	    (let ((str (buffer-substring start (point)))
-		  val head tail)
-	      ;; Setting variable named "end" means end of list.
-	      (cond
-	       ((string-equal (downcase str) "end")
-		(setq continue nil))
-	       ((string-equal str "coding")
-		(setq latin-unity-coding-cookies-found
-		      (1+ latin-unity-coding-cookies-found))
-		(warn "Coding cookie in local variables unsupported")
-		(when (> latin-unity-coding-cookies-found 1)
-		  (warn "Multiple coding cookies found"))
+	    (let (var val head tail)
+	      ;; #### need to use lisp-mode syntax table here;
+	      ;; 2d arg of char-syntax
+	      ;; #### need to hack eol here
+	      (if (or (eql (char-after) ?:)
+		      (not (eql (char-syntax (char-after)) ?_)))
+		  (setq problems (cons "no local variable found" problems))
+		(setq var (read (current-buffer)))
+		;; magic cookies suck AND SWALLOW!
+		;; #### I'll be damned if I'll worry about colon-terminated
+		;; variable names here -- what if there are MULTIPLE COLONS?
+		(let ((name (symbol-name var)))
+		  (setq var (if (eql ?: (aref name (1- (length name))))
+				(forward-char -1) ; back up over colon
+				(substring name 0 -1)
+			      name)))
+		(skip-chars-forward " \t")
+		(if (equal (char-after) ?:)
+		    (forward-char 1)
+		  (setq problems (cons "Missing colon in local variables entry"
+				       problems))))
+	      ;; end: probably doesn't have a value
+	      (if (string-equal "end" var)
+		  (setq continue nil)
 		;; read the variable value.
-		(skip-chars-forward "^:")
-		(forward-char 1)
 		(skip-chars-forward " \t")
-		(setq head (point))
-		(setq val (read (current-buffer)))
-		(setq tail (point))
-		(skip-chars-backward "\n")
-		(skip-chars-forward " \t")
-		(or (if suffix (looking-at suffix) (eolp))
-		    (warn "Local variables entry is terminated incorrectly"))
-		(latin-unity-hack-coding-cookie val head tail force))))))))))
+		;; check for effective end-of-line
+		(if (or (eolp)
+			(looking-at "\\s<\\|\\s1\\s2\\|\\s5\\s6"))
+		    (setq problems (cons "no value found for local variable"
+					 problems))
+		  (setq head (point))
+		  ;; #### this can error on a syntax error (eg "( . nil)")
+		  (setq val (read (current-buffer)))
+		  (setq tail (point))
+		  (skip-chars-forward " \t")
+		  (unless (if suffix (looking-at suffix) (eolp))
+		    (setq problems
+			  (cons "Local variables entry has incorrect suffix"
+				problems))))
+		(cond
+		 (problems (while problems
+			     (warn (car problems))
+			     (setq problems (cdr problems)))
+			   (setq continue nil))
+		 ((string-match "coding" var)
+		  (warn "Coding cookie in local variables unsupported")
+		  (latin-unity-hack-coding-cookie val head tail force))))
+	      )))))))
 
 (defun latin-unity-hack-cookies-prop-line (&optional force)
   "Find a coding cookie in the first (non-shebang) line of the file.
     (save-restriction
       (widen)
       (goto-char (point-min))
-      ;; Excuse me?!?
-      (skip-chars-forward " \t\n\r")
+      (skip-chars-forward " \t\n\r")	; does exec(2) gobble leading space?
       (let ((end (save-excursion
 		   ;; If the file begins with "#!"
 		   ;; (un*x exec interpreter magic), look
 		   ;; put them in the first line of
 		   ;; such a file without screwing up
 		   ;; the interpreter invocation.
-		   (end-of-line (and (looking-at "^#!") 2))
+		   (end-of-line (if (looking-at "^#!") 2 1))
 		   (point))))
 	;; Parse the -*- line into the `result' alist.
-	(when (search-forward "-*-" end t)
+	(let* ((stx (and (search-forward "-*-" end t) (point)))
+	       ;; if there are more than two "-*-", use the first two
+	       (etx (and stx (search-forward "-*-" end t) (- (point) 3))))
 	  ;; insist on correct format and silently ignore otherwise
-	  (while (re-search-forward "\\(\\S_coding:[ \t]*\\).*-\\*-"
-				    (point-at-eol) t)
-	    (goto-char (match-end 1))
-	    (let* ((head (point))
-		   (val (read (current-buffer)))
-		   (tail (point)))
-	      (setq latin-unity-coding-cookies-found
-		    (1+ latin-unity-coding-cookies-found))
-	      (when (> latin-unity-coding-cookies-found 1)
-		(warn "%d coding cookies found; you should have only one."
-		      latin-unity-coding-cookies-found))
-	      (latin-unity-hack-coding-cookie val head tail force))))))))
+	  (cond
+	   ((null stx) nil)
+	   ((null etx) (warn "unterminated prop line, ignoring"))
+	   (t (goto-char stx)
+	      (while (re-search-forward "coding:[ \t]*" etx t)
+		(goto-char (match-end 0))
+		(let* ((head (point))
+		       (val (read (current-buffer)))
+		       (tail (point)))
+		  (latin-unity-hack-coding-cookie val head tail force))))))))))
 
 (defun latin-unity-hack-coding-cookie (value begin end &optional force)
   "Fixup a coding cookie.
 coding cookie found between BEGIN and END should be changed.  If optional
 argument FORCE is non-nil, fix the cookie without prompt.
 #### Probably there should be an argument for the coding system to set."
+  (setq latin-unity-coding-cookies-found
+	(1+ latin-unity-coding-cookies-found))
+  (when (> latin-unity-coding-cookies-found 1)
+    (warn "%d coding cookies found; you should have only one."
+	  latin-unity-coding-cookies-found))
   (let ((bfcs (latin-unity-base-name buffer-file-coding-system)))
     (unless (eq value bfcs)
       (when (or force
   (erase-buffer)
   (insert "From here ...\n")
   (insert "Latin-1: f")
-  (insert (make-char 'latin-iso8859-1 #xFC)) ; u umlaut, also in Latin-2
+  (insert (make-char 'latin-iso8859-1 #xFC)) ; u diaeresis, also in Latin-2
   (insert "r\n\nLatin-2: Nik")		; my apologies if I misremembered
-  (insert (make-char 'latin-iso8859-2 57)) ; s caron, not in Latin-1
+  (insert (make-char 'latin-iso8859-2 #xB9)) ; s caron, not in Latin-1
   (insert ?i)
-  (insert (make-char 'latin-iso8859-2 102)) ; c acute, not in Latin-1
+  (insert (make-char 'latin-iso8859-2 #xE6)) ; c acute, not in Latin-1
   (insert "\n... to here is representable in Latin-2 but not Latin-1.\n")
-  (insert (make-char 'latin-iso8859-1 255)) ; y daieresis, not in Latin-2
+  (insert (make-char 'latin-iso8859-1 #xFF)) ; y daieresis, not in Latin-2
   (insert "\nFrom top to here is not representable in Latin-[12].\n")
 
   (insert "

File latin-unity.texi

 @end macro
 
 @c Copying permissions, et al
-@c Note that this whole section is repeated twice, once for the Info
-@c version and once for TeX.  ####  How about HTML, etc?
+@c Note that this whole section is repeated thrice, once for the Info
+@c version, once for TeX, and once for HTML.
+@c Note that if you combine this document with others' work, you may
+@c need to change the permissions statement.  Make sure you do so in all
+@c three places.
+@c #### Probably not the right place for HTML.
+@html
+This file is part of XEmacs.  It documents the @pkgname{} package,
+which ensures that wherever possible representations of all Latin
+characters are drawn from the same 8-bit character set.
+     
+Copyright @copyright{} 2002, 2003 Free Software Foundation, Inc.
+     
+Permission is granted to make and distribute verbatim or modified copies
+of this manual provided that the copyright notice above is preserved,
+and at least one of the numbered paragraphs below up to the phrase "End
+of permissions notice." is included, under the terms of any of the
+licenses enumerated below.
+
+1. The GNU General Public License, version 2 or any later version
+published by the Free Software Foundation, Inc.  A copy of the GNU
+General Public License was included with your copy of XEmacs.
+Alternatively, you may request a copy from the Free Software Foundation,
+Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+2. The license used for XEmacs documentation (see the file
+man/xemacs/xemacs.texi distributed with XEmacs).
+
+3. The GNU Free Documentation License (available from the Free Software
+Foundation at the address above).
+
+End of permissions notice.
+
+Because the XEmacs documentation license and the GNU Free Documentation
+License are not free software licenses, and are mutually incompatible
+with each other and with the GNU General Public License, it is desirable
+that the permissions given here be preserved if possible.  This normally
+requires that you write fresh text for any additions or modifications to
+this file, rather than copying code or comments from other sources.  The
+exceptions are if you are sole copyright holder for the other source, or
+if you receive permission from the holders of the copyrights for the
+other sources.
+
+That is, if you merge code or comments from a file licensed to you only
+under the GNU General Public License you @emph{may not} distribute
+under the documentation licenses or with a dual license; such a
+combination may be distributed under the GNU General Public License
+@emph{only}.  Similarly, if you copy text from a file licensed to you
+only under the XEmacs documentation license or the GNU Free
+Documentation License you may distribute the result @emph{only} under
+the appropriate license.
+@end html
+
 @ifinfo
 This file is part of XEmacs.  It documents the @pkgname{} package,
 which ensures that wherever possible representations of all Latin
 characters are drawn from the same 8-bit character set.
      
-Copyright @copyright{} 2002 Free Software Foundation, Inc.
+Copyright @copyright{} 2002, 2003 Free Software Foundation, Inc.
      
-Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-     
+Permission is granted to make and distribute verbatim or modified copies
+of this manual provided that the copyright notice above is preserved,
+and at least one of the numbered paragraphs below up to the phrase "End
+of permissions notice." is included, under the terms of any of the
+licenses enumerated below.
+
 @ignore 
 Permission is granted to process this file through TeX and print the
 results, provided the printed document carries a copying permission
 notice identical to this one except for the removal of this paragraph
 (this paragraph not being relevant to the printed manual).
-   
+
 @end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-sections entitled ``Copying'' and ``GNU General Public License'' are
-included exactly as in the original, and provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-     
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation
-approved by the Free Software Foundation.
+1. The GNU General Public License, version 2 or any later version
+published by the Free Software Foundation, Inc.  A copy of the GNU
+General Public License was included with your copy of XEmacs.
+Alternatively, you may request a copy from the Free Software Foundation,
+Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+2. The license used for XEmacs documentation (see the file
+man/xemacs/xemacs.texi distributed with XEmacs).
+
+3. The GNU Free Documentation License (available from the Free Software
+Foundation at the address above).
+
+End of permissions notice.
+
+Because the XEmacs documentation license and the GNU Free Documentation
+License are not free software licenses, and are mutually incompatible
+with each other and with the GNU General Public License, it is desirable
+that the permissions given here be preserved if possible.  This normally
+requires that you write fresh text for any additions or modifications to
+this file, rather than copying code or comments from other sources.  The
+exceptions are if you are sole copyright holder for the other source, or
+if you receive permission from the holders of the copyrights for the
+other sources.
+
+That is, if you merge code or comments from a file licensed to you only
+under the GNU General Public License you @emph{may not} distribute
+under the documentation licenses or with a dual license; such a
+combination may be distributed under the GNU General Public License
+@emph{only}.  Similarly, if you copy text from a file licensed to you
+only under the XEmacs documentation license or the GNU Free
+Documentation License you may distribute the result @emph{only} under
+the appropriate license.
 @end ifinfo
 
 @tex
 @author Stephen J. Turnbull
 @page
 
-This manual is part of XEmacs.  It documents the @pkgname{} package,
+This file is part of XEmacs.  It documents the @pkgname{} package,
 which ensures that wherever possible representations of all Latin
 characters are drawn from the same 8-bit character set.
      
-Copyright @copyright{} 2002 Free Software Foundation, Inc.
+Copyright @copyright{} 2002, 2003 Free Software Foundation, Inc.
      
 @vskip 0pt plus 1filll
-Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
+Permission is granted to make and distribute verbatim or modified copies
+of this manual provided that the copyright notice above is preserved,
+and at least one of the numbered paragraphs below up to the phrase "End
+of permissions notice." is included, under the terms of any of the
+licenses enumerated below.
+
+@ignore 
+Permission is granted to process this file through TeX and print the
+results, provided the printed document carries a copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual).
+   
+@end ignore
+1. The GNU General Public License, version 2 or any later version
+published by the Free Software Foundation, Inc.  A copy of the GNU
+General Public License was included with your copy of XEmacs.
+Alternatively, you may request a copy from the Free Software Foundation,
+Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+2. The license used for XEmacs documentation (see the file
+man/xemacs/xemacs.texi distributed with XEmacs).
+
+3. The GNU Free Documentation License (available from the Free Software
+Foundation at the address above).
+
+End of permissions notice.
+
+Because the XEmacs documentation license and the GNU Free Documentation
+License are not free software licenses, and are mutually incompatible
+with each other and with the GNU General Public License, it is desirable
+that the permissions given here be preserved if possible.  This normally
+requires that you write fresh text for any additions or modifications to
+this file, rather than copying code or comments from other sources.  The
+exceptions are if you are sole copyright holder for the other source, or
+if you receive permission from the holders of the copyrights for the
+other sources.
+
+That is, if you merge code or comments from a file licensed to you only
+under the GNU General Public License you @emph{may not} distribute
+under the documentation licenses or with a dual license; such a
+combination may be distributed under the GNU General Public License
+@emph{only}.  Similarly, if you copy text from a file licensed to you
+only under the XEmacs documentation license or the GNU Free
+Documentation License you may distribute the result @emph{only} under
+the appropriate license.
      
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided also that the
-sections entitled ``Copying'' and ``GNU General Public License'' are
-included exactly as in the original, and provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-     
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation
-approved by the Free Software Foundation.
-
 @end titlepage
 @page