[latin-unity] Fix suboptimal interaction of latin-unity and VM.

Stephen J. Turnbull stephen at xemacs.org
Fri Feb 16 04:37:09 EST 2007


latin-unity

Could you guys try this patch?  This should fix it, conceptually.  If
it doesn't, there are some other severe problems with the whole
latin-unity approach, I'm afraid.  I don't have a comprehensive test
suite, so I can't be sure it will work for you.

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/latin-unity/ChangeLog,v
retrieving revision 1.50
diff -u -r1.50 ChangeLog
--- ChangeLog	16 Feb 2007 09:10:18 -0000	1.50
+++ ChangeLog	16 Feb 2007 09:21:32 -0000
@@ -0,0 +1,8 @@
+2007-02-16  Stephen J. Turnbull  <stephen at xemacs.org>
+
+	* latin-unity.el (latin-unity-representations-present-region):
+	Assume C1 characters map to themselves, as is true for all
+	ISO-8859-X coding systems.  Should fix the bug reported by
+	Joachim Schrod and Fabrice Popineau.  See
+	<ire6dxp3.fsf at esemetz.metz.supelec.fr>.
+

Index: latin-unity.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/latin-unity/latin-unity.el,v
retrieving revision 1.16
diff -u -r1.16 latin-unity.el
--- latin-unity.el	16 Feb 2007 09:10:18 -0000	1.16
+++ latin-unity.el	16 Feb 2007 09:21:32 -0000
@@ -491,12 +491,27 @@
 	      ;;(setq skipchars (concat skipchars latin-unity-latin-jisx0201))
 	      (setq skipchars (concat skipchars (list ch)))
 	      (setq asets (logior flag asets)))
+	     ;; Control-1 hack
+	     ;; C1 characters map to themselves in all ISO 8859 coding
+	     ;; systems.  So we ignore them in the feasibility computation.
+	     ;; #### It would be nice to unify Windows-12xx charsets among
+	     ;; themselves.  Then add a local variable c1sets, and treat
+	     ;; skipchars as in the default clause, below.  This requires
+	     ;; deciding how to treat C1 characters when graphic characters
+	     ;; are also present in the same range.  What Would Gates Do?
+	     ;; This will also require an interface change.  This function
+	     ;; will need to return (lsets c1set asets), which is why I'm
+	     ;; not doing the generalization yet.
+	     ((eq cs 'control-1)
+	      ;; minor optimization
+	      (setq skipchars (concat "\200-\237" skipchars)))
 	     (t
 	      ;; #### actually we can do the whole charset here
 	      ;; precompute and set a property on the cs symbol
 	      (setq skipchars (concat skipchars (list ch)))
-	      (when (= flag 0) (setq lsets (logior latin-unity-non-latin-bit-flag lsets)))
-	      (setq lsets (logior flag lsets)))))
+	      (if (= flag 0)
+		  (setq lsets (logior latin-unity-non-latin-bit-flag lsets))
+		(setq lsets (logior flag lsets))))))
 	  ;; The characters skipped here can't change asciisets
 	  (skip-chars-forward skipchars))))
     (cons lsets asets)))



More information about the XEmacs-Beta mailing list