comparison lisp/mule/mule-x-init.el @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 3ecd8885ac67
children 7039e6323819
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
38 38
39 Traditionally, Asian characters have been displayed so that they 39 Traditionally, Asian characters have been displayed so that they
40 occupy exactly twice the screen space of ASCII (`halfwidth') 40 occupy exactly twice the screen space of ASCII (`halfwidth')
41 characters. On many systems, e.g. Sun CDE systems, this can only be 41 characters. On many systems, e.g. Sun CDE systems, this can only be
42 achieved by using a national variant roman font to display ASCII." 42 achieved by using a national variant roman font to display ASCII."
43 (let ((charset-font-width 43 (let* ((charset-font-width
44 (lambda (charset) 44 (lambda (charset)
45 (font-instance-width 45 (font-instance-width
46 (face-font-instance 'default (selected-device) charset)))) 46 (face-font-instance 'default (selected-device) charset))))
47 47
48 (twice-as-wide 48 (twice-as-wide
49 (lambda (cs1 cs2) 49 (lambda (cs1 cs2)
50 (let ((width1 (funcall charset-font-width cs1)) 50 (let ((width1 (funcall charset-font-width cs1))
51 (width2 (funcall charset-font-width cs2))) 51 (width2 (funcall charset-font-width cs2)))
52 (and width1 width2 (eq (+ width1 width1) width2)))))) 52 (and width1 width2 (eq (+ width1 width1) width2))))))
53 53
54 (when (eq 'x (device-type)) 54 (when (eq 'x (device-type))
55 (condition-case nil 55 (condition-case nil
56 (unless (funcall twice-as-wide 'ascii fullwidth-charset) 56 (unless (funcall twice-as-wide 'ascii fullwidth-charset)
57 (set-charset-registry 'ascii roman-registry) 57 (set-charset-registry 'ascii roman-registry)