User: stephent
Date: 06/08/13 09:45:53
Modified: packages/mule-packages/latin-unity ChangeLog
latin-unity-vars.el latin-unity.el
Log:
Make latin-unity ignore non-latin charsets.
<87fyg1w04a.fsf(a)tleepslib.sk.tsukuba.ac.jp>
Revision Changes Path
1.48 +8 -0 XEmacs/packages/mule-packages/latin-unity/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/latin-unity/ChangeLog,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -p -r1.47 -r1.48
--- ChangeLog 2006/06/28 07:58:32 1.47
+++ ChangeLog 2006/08/13 07:45:52 1.48
@@ -1,3 +1,11 @@
+2006-06-22 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * latin-unity-vars.el (latin-unity-non-latin-bit-flag): New constant.
+
+ * latin-unity.el (latin-unity-representations-present-region): Use
+ it to kludge around bug reported in
+ <m364iwq4yq.fsf(a)jerrypc.cs.usu.edu>.
+
2006-06-28 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.18 released.
1.7 +12 -9 XEmacs/packages/mule-packages/latin-unity/latin-unity-vars.el
Index: latin-unity-vars.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/latin-unity/latin-unity-vars.el,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- latin-unity-vars.el 2005/02/15 22:22:48 1.6
+++ latin-unity-vars.el 2006/08/13 07:45:52 1.7
@@ -150,14 +150,17 @@ with the equivalence table.")
"Bit vector representing the set of all Latin character sets.")
;; put the character set indicies and flag bits in reasonable places
-(let ((index 1) (bit 1))
- (if (> (length latin-unity-character-sets) 25)
- (error "representation too small to support so many charsets!"))
- (mapcar (lambda (cs)
- (put cs 'latin-unity-flag-bit bit)
- (put cs 'latin-unity-index index)
- (setq bit (lsh bit 1)
- index (1+ index)))
- latin-unity-character-sets))
+(defconst latin-unity-non-latin-bit-flag
+ (let ((index 1) (bit 1))
+ (if (> (length latin-unity-character-sets) 25)
+ (error "representation too small to support so many charsets!"))
+ (mapcar (lambda (cs)
+ (put cs 'latin-unity-flag-bit bit)
+ (put cs 'latin-unity-index index)
+ (setq bit (lsh bit 1)
+ index (1+ index)))
+ latin-unity-character-sets)
+ bit)
+ "A bit-flag indicating charsets not handled by latin-unity.")
;;; end of latin-unity-vars.
1.15 +6 -4 XEmacs/packages/mule-packages/latin-unity/latin-unity.el
Index: latin-unity.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/latin-unity/latin-unity.el,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- latin-unity.el 2006/05/02 21:58:12 1.14
+++ latin-unity.el 2006/08/13 07:45:52 1.15
@@ -469,21 +469,23 @@ character sets. BUFFER defaults to the
(goto-char (point-min))
(while (not (eobp))
(let* ((ch (char-after))
- (cs (car (split-char ch))))
+ (cs (car (split-char ch)))
+ (flag (get cs 'latin-unity-flag-bit 0)))
(cond
((eq cs 'ascii)
(setq skipchars (concat "\000-\177" skipchars))
- (setq asets (logior (get cs 'latin-unity-flag-bit 0) asets)))
+ (setq asets (logior flag asets)))
((eq cs 'latin-jisx0201)
;; #### get this someday
;;(setq skipchars (concat skipchars latin-unity-latin-jisx0201))
(setq skipchars (concat skipchars (list ch)))
- (setq asets (logior (get cs 'latin-unity-flag-bit 0) asets)))
+ (setq asets (logior flag asets)))
(t
;; #### actually we can do the whole charset here
;; precompute and set a property on the cs symbol
(setq skipchars (concat skipchars (list ch)))
- (setq lsets (logior (get cs 'latin-unity-flag-bit 0) lsets)))))
+ (when (= 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)))
Show replies by date