CVS update by aidan packages/mule-packages/mule-base, fsf-compat-unicode.el ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Fri Dec 1 16:27:40 EST 2006


  User: aidan   
  Date: 06/12/01 22:27:40

  Modified:    packages/mule-packages/mule-base ChangeLog
                        fsf-compat-unicode.el
Log:
Fix the package smoketest; define-ccl-program is a macro, and needs to be
expanded if we're compling on 21.4.

Revision  Changes    Path
1.56      +8 -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.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- ChangeLog	2006/11/29 22:28:17	1.55
+++ ChangeLog	2006/12/01 21:27:39	1.56
@@ -1,3 +1,11 @@
+2006-12-01  Aidan Kehoe  <kehoea at parhasard.net>
+
+	* fsf-compat-unicode.el:
+	* fsf-compat-unicode.el (fsf-compat-ccl-encode-to-ucs-2): Removed.
+	* fsf-compat-unicode.el (eval-when-compile):
+	Pre-expand the macro if we're compiling on 21.4; fixes a packages
+	smoketest failure. 
+
 2006-11-29  Aidan Kehoe  <kehoea at parhasard.net>
 
 	* Makefile (ELCS):



1.2       +39 -9     XEmacs/packages/mule-packages/mule-base/fsf-compat-unicode.el

Index: fsf-compat-unicode.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/mule-base/fsf-compat-unicode.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- fsf-compat-unicode.el	2006/11/29 22:28:17	1.1
+++ fsf-compat-unicode.el	2006/12/01 21:27:39	1.2
@@ -34,15 +34,45 @@
                      (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.")
 
+(if (eval-when-compile
+      (and (> emacs-major-version 20)  
+	   (> emacs-minor-version 4)
+	   (featurep 'mule)))
+
+    ;; If we're being compiled by 21.5, use the actual define-ccl-program
+    ;; macro, but evaluated at runtime. 
+    ;;
+    ;; Having this as 
+    ;;
+    ;;   (eval-when-compile (and (featurep 'mule) (macroexpand
+    ;;   '(define-ccl-program ...))
+    ;;
+    ;; in order to have the macro evaluated at compile time, results
+    ;; in the statement being empty in the compiled file, which as I
+    ;; understand it is a bug.
+
+    (eval
+     '(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."))
+
+  ;; Pre-expand the macro for 21.4. 21.4 will error on loading this file, but 
+  ;; it may compile it. define-ccl-program should not be a macro, but that's 
+  ;; by the way. 
+  (let ((prog [1 10 131127 8 98872 65823 147513 8 82009 255 22])) 
+    (defconst fsf-compat-ccl-encode-to-ucs-2 prog 
+      "CCL program to transform Mule characters to UCS-2.") 
+    (put (quote fsf-compat-ccl-encode-to-ucs-2) 
+	 (quote ccl-program-idx) 
+	 (register-ccl-program (quote fsf-compat-ccl-encode-to-ucs-2) prog))  
+    nil))
+
 (defun fsf-compat-init-mule-unicode-charsets ()
   "Make some Mule character sets that the FSF uses available in XEmacs.
 
@@ -98,4 +128,4 @@ character sets if you're editing FSF sou
 ; 		 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
\ No newline at end of file
+;;; end fsf-compat-unicode.el





More information about the XEmacs-CVS mailing list