Commits

aidan  committed c4adf80

Avoid compile-time-loading of mule/make-coding-system.el with 21.5, Mule-UC

  • Participants
  • Parent commits 9514349

Comments (0)

Files changed (4)

File lisp/ChangeLog

+2009-10-01  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* mucs-type.el (mucs-make-coding-system): 
+	New macro, using #'make-coding-system-internal if that is
+	available, and #'make-coding-system if not. Avoids compile-time
+	loading of mule/make-coding-system.el on 21.5, which fails because
+	that file uses #'decode-char, broken by Mule-UCS.
+	* mucs-ccl.el (mucs-ccl-define-temporal-coding-system): 
+	Use the mucs-make-coding-system macro, not make-coding-system
+	directly.
+	* mucs.el (mucs-define-coding-system): 
+	Use the mucs-make-coding-system macro, not make-coding-system
+	directly.
+
 2009-10-01  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* mucs-ccl.el (mucs-ccl-define-temporal-coding-system): 

File lisp/mucs-ccl.el

      (mucs-conversion-get conv 'mucs-compiled-code))
     (if (not (coding-system-p
 	      'mucs-ccl-temporary))
-	(make-coding-system
+        ;; Ugly, but compiles under 21.5. 
+	(mucs-make-coding-system
          'mucs-ccl-temporary 'ccl
          "Temporary coding-system privately used by MUCS-CCL"
 	 `(encode mucs-ccl-temp-ccl-prog

File lisp/mucs-type.el

 
 (defvar mucs-type-alist nil)
 
+(defmacro mucs-make-coding-system (&rest args)
+  `(funcall (if (fboundp 'make-coding-system-internal)
+                'make-coding-system-internal
+              'make-coding-system) ,@args))
+
 (defsubst mucs-type-p (type)
   (and (assq type mucs-type-alist)
        t))

File lisp/mucs.el

 		     (t
 		      t)))
 	 `(or (find-coding-system ,symbol)
-	      (make-coding-system
+	      (mucs-make-coding-system
 	       ,symbol 'ccl ,doc-string
 	       (list 'decode ,decode-conversion
 		     'encode ,encode-conversion
 				 (char-to-string ,mnemonic))
 		     'eol-type ,eol-type))))
 	((mule-version-satisfied-p 4 1)
-	 `(make-coding-system
+	 `(mucs-make-coding-system
 	   ,symbol 4 ,mnemonic ,doc-string
 	   (cons ,decode-conversion
 		 ,encode-conversion)
 	   ,alist ,eol-type))
 	((featurep 'mule)
-	 `(make-coding-system
+	 `(mucs-make-coding-system
 	   ,symbol 4 ,mnemonic ,doc-string
 	   (cons ,decode-conversion
 		 ,encode-conversion)