comparison lisp/mule/mule-x-init.el @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
1 ;;; mule-x-init.el --- initialization code for X Windows under MULE 1 ;;; mule-x-init.el --- initialization code for X Windows under MULE
2 ;; Copyright (C) 1994 Free Software Foundation, Inc. 2 ;; Copyright (C) 1994 Free Software Foundation, Inc.
3 ;; Copyright (C) 1996 Ben Wing <ben@xemacs.org> 3 ;; Copyright (C) 1996 Ben Wing <wing@666.com>
4 4
5 ;; Author: various 5 ;; Author: various
6 ;; Keywords: mule X11 6 ;; Keywords: mule X11
7 7
8 ;; This file is part of XEmacs. 8 ;; This file is part of XEmacs.
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)