CVS update by aidan packages/xemacs-packages/fsf-compat ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Wed Nov 29 17:28:22 EST 2006


  User: aidan   
  Date: 06/11/29 23:28:22

  Modified:    packages/xemacs-packages/fsf-compat ChangeLog
  Added:       packages/mule-packages/mule-base fsf-compat-unicode.el
Log:
Provide some compatibility for GNU's ISO2022 Unicode charsets.

Revision  Changes    Path
1.55      +7 -0      XEmacs/packages/mule-packages/mule-base/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/mule-base/ChangeLog,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -p -r1.54 -r1.55
--- ChangeLog	2006/05/03 12:05:21	1.54
+++ ChangeLog	2006/11/29 22:28:17	1.55
@@ -1,3 +1,10 @@
+2006-11-29  Aidan Kehoe  <kehoea at parhasard.net>
+
+	* Makefile (ELCS):
+	* fsf-compat-unicode.el:
+	Provide support for some FSF-specific Unicode-coverage Mule
+	charsets. 
+
 2006-05-03  Norbert Koch  <viteno at xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.48 released.



1.56      +1 -1      XEmacs/packages/mule-packages/mule-base/Makefile

Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/mule-base/Makefile,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- Makefile	2006/05/03 12:05:21	1.55
+++ Makefile	2006/11/29 22:28:17	1.56
@@ -29,7 +29,7 @@ ELCS =	canna.elc char-table.elc chartblx
 	cyril-util.elc kana-keyboard.elc korea-util.elc isearch-mule.elc \
 	japan-util.elc mule-cne.elc mule-diag.elc mule-keyboard.elc \
 	mule-trex.elc mule-util.elc thai-xtis-util.elc viet-util.elc \
-	ethio-util.elc
+	ethio-util.elc fsf-compat-unicode.elc
 
 # The following are shipped unbytecompiled because they aren't grokked by
 # the version of XEmacs used to build distribution packages



1.1                  XEmacs/packages/mule-packages/mule-base/fsf-compat-unicode.el

Index: fsf-compat-unicode.el
===================================================================
;;; fsf-compat-unicode.el --- Provide the FSF's Mule UCS subsets in XEmacs. 

;; Copyright (C) 2006 by Free Software Foundation, Inc.

;; Author: Aidan Kehoe <kehoea at parhasard.net>
;; Keywords: Unicode, Mule

;; This file is part of XEmacs.

;; XEmacs is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; XEmacs is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with XEmacs; see the file COPYING.  If not, write to the Free
;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
;; 02111-1307, USA.

;;; Synched up with: Not in FSF

;;; Commentary:

;;; Code:

;;; Only for 21.5 and newer. 
(unless (and (fboundp 'encode-char)
             (eq #x31C (with-fboundp '(encode-char decode-char)
                     (encode-char (decode-char 'ucs #x31C) 'ucs))))
  (error "Unicode support needed for this file not available!"))

(define-ccl-program fsf-compat-ccl-encode-to-ucs-2
  `(1
    ((r1 = (r1 << 8))
     (r1 = (r1 | r2))
     (mule-to-unicode r0 r1)
     (r1 = (r0 >> 8))
     (r2 = (r0 & 255))))
  "CCL program to transform Mule characters to UCS-2.")

(defun fsf-compat-init-mule-unicode-charsets ()
  "Make some Mule character sets that the FSF uses available in XEmacs.

These character sets cover some Unicode code space explicitly; we use a
different solution to the same problem, so you should only need these
character sets if you're editing FSF source.  "
  (let (charset-symbol)
    (loop
      for (first-ucs last-ucs final) in '((#x0100 #x24FF ?1)
					  (#x2500 #x33ff ?2)
					  (#xE000 #xFFFF ?3))
      do 
      (setq charset-symbol 
	    (intern (format "mule-unicode-%04x-%04x"
			    first-ucs last-ucs)))
      (make-charset charset-symbol
		    (format 
		     "Unicode subset (U+%04X..U+%04X) for FSF compatibility."
		     first-ucs last-ucs)
		    (list 'dimension 2 
			  'registries ["iso10646-1"]
			  'chars 96
			  'columns 1
			  'direction 'l2r
			  'final final
			  'graphic 0
			  'short-name (format "Unicode subset %c" final)
			  'long-name (format "Unicode subset (U+%04X..U+%04X)"
					     first-ucs last-ucs)
			  'ccl-program 'fsf-compat-ccl-encode-to-ucs-2))
      ;; The names of the character sets lie, at least as of GNU Emacs
      ;; 22.0.50.3. The difference appears to be that they keep assigning
      ;; code points until the end of the 96x96 space of the character sets.
      (loop for ku from 32 to 127 do
	(loop for ten from 32 to 127 do 
	  (set-unicode-conversion (make-char charset-symbol ku ten) first-ucs)
	  (incf first-ucs))))))

;; The following code creates a form, which, when evaluated in GNU Emacs,
;; checks our compatibility with their three character sets.

; (progn
;   (insert "(require 'cl)\n\n(assert\n (and\n")
;   (loop
;     for charset-symbol in '(mule-unicode-2500-33ff
; 			    mule-unicode-e000-ffff
; 			    mule-unicode-0100-24ff)
;     do
;     (loop for ku from 32 to 127 do
;       (loop for ten from 32 to 127 do
; 	(insert (format
; 		 "  (eq (encode-char (make-char '%s %d %d) 'ucs) #x%04X)\n" 
; 		 charset-symbol ku ten 
; 		 (encode-char (make-char charset-symbol ku ten) 'ucs))))))
;   (insert "  ) nil \"We're incompatible with the FSF!\")"))
;;; end fsf-compat-unicode.el


1.20      +6 -0      XEmacs/packages/xemacs-packages/fsf-compat/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/fsf-compat/ChangeLog,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- ChangeLog	2004/10/22 15:51:51	1.19
+++ ChangeLog	2006/11/29 22:28:22	1.20
@@ -1,3 +1,9 @@
+2006-11-29  Aidan Kehoe  <kehoea at parhasard.net>
+
+	* mule-unicode-charsets.el:
+	Provide support for some FSF-specific Unicode-coverage Mule
+	charsets. 
+
 2004-10-22  Norbert Koch  <viteno at xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.15 released.





More information about the XEmacs-CVS mailing list