Ar an séiú lá de mí na Samhain, scríobh stephen(a)xemacs.org:
> They’re already commented out--they’re just commentary on GNU
Emacs’
> approach to implementing Unicode. I’ve replaced them with a clearer
> description of GNU’s approach and how ours differs.
I know they're commented out, but as I said, I've seen code that uses
those charsets in the wild. If and when we get a bug report on that,
I'd rather have that code in an obvious place.
Then checking the below into FSF-Compat would be a better approach, I
think. Though the correspondence with their unicode code points is not
exact--that’s something I need to look into and to solve.
Something's weird, then, because in the patch you posted there
were a
lot of repeated braces at the same indent level, as
code;
}
}
Are you saying you've since reformatted that to
code;
}
}
?
Well, I didn’t see the symptom, despite looking at the original, and I
didn’t see the cure, despite looking at the diff, but indent-region should
have taken care of it. Or maybe it’s a question of tab stops.
Anyway, here’s that code mentioned above:
;;; BEGIN compat-mule-unicode-charsets.el
(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 (ku ten 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))
(setq ten 32)
;; 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
(set-unicode-conversion (make-char charset-symbol ku ten) first-ucs)
(incf first-ucs)
(incf ten)
(when (= ten 128) (setq ten 32))))))
;;; BEGIN compat-mule-unicode-charsets.el
--
Santa Maradona, priez pour moi!
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches