Mercurial > hg > xemacs-beta
comparison lisp/descr-text.el @ 5166:b50624d3ae55
open-database.message
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 26 Mar 2010 15:06:28 +0000 |
parents | e6dec75ded0e |
children | b36d089cbed5 |
comparison
equal
deleted
inserted
replaced
5165:17fe69fff7fa | 5166:b50624d3ae55 |
---|---|
255 :group 'mule | 255 :group 'mule |
256 :type '(choice (const :tag "None" nil) | 256 :type '(choice (const :tag "None" nil) |
257 file)) | 257 file)) |
258 | 258 |
259 ;; XEmacs additions, from here until `describe-char-unicode-data' | 259 ;; XEmacs additions, from here until `describe-char-unicode-data' |
260 (defcustom describe-char-use-cache t | |
261 "Whether `describe-char' should use a DBM or Berkeley DB cache. | |
262 This speeds up navigation of `describe-char-unicodedata-file', and makes | |
263 navigation of `describe-char-unihan-file' reasonable." | |
264 :group 'mule | |
265 :type '(choice (const :tag "None" nil) | |
266 file)) | |
267 | |
268 (defcustom describe-char-unihan-file nil | 260 (defcustom describe-char-unihan-file nil |
269 "Location of Unihan file. | 261 "Location of Unihan file. |
270 This the Unihan.txt file from the Unicode Consortium, used for diagnostics. | 262 This the Unihan.txt file from the Unicode Consortium, used for diagnostics. |
271 If it is non-nil `describe-char' can print data looked up from it. This | 263 If it is non-nil `describe-char' can print data looked up from it. This |
272 facility is of use to people doing multilingual development, to those | 264 facility is of use to people doing multilingual development, to those |
287 ;; XEmacs addition | 279 ;; XEmacs addition |
288 (defvar unidata-database-format | 280 (defvar unidata-database-format |
289 (or (and (featurep 'dbm) 'dbm) | 281 (or (and (featurep 'dbm) 'dbm) |
290 (and (featurep 'berkeley-db) 'berkeley-db)) | 282 (and (featurep 'berkeley-db) 'berkeley-db)) |
291 "The DB format to use for the `describe-char' cache, or nil if no cache.") | 283 "The DB format to use for the `describe-char' cache, or nil if no cache.") |
284 | |
285 (defcustom describe-char-use-cache (not (null unidata-database-format)) | |
286 "Whether `describe-char' should use a DBM or Berkeley DB cache. | |
287 This speeds up navigation of `describe-char-unicodedata-file', and makes | |
288 navigation of `describe-char-unihan-file' reasonable." | |
289 :group 'mule | |
290 :type '(choice (const :tag "None" nil) | |
291 file)) | |
292 | 292 |
293 (defvar describe-char-unihan-field-descriptions | 293 (defvar describe-char-unihan-field-descriptions |
294 #s(hash-table :test equal :data | 294 #s(hash-table :test equal :data |
295 ("kAccountingNumeric" | 295 ("kAccountingNumeric" |
296 "Value as an an accounting numeral" | 296 "Value as an an accounting numeral" |
965 (let* ((frame (selected-frame)) | 965 (let* ((frame (selected-frame)) |
966 (charset (char-charset char)) | 966 (charset (char-charset char)) |
967 (ccl (or (and (charset-property charset 'encode-as-utf-8) | 967 (ccl (or (and (charset-property charset 'encode-as-utf-8) |
968 ccl-encode-to-ucs-2) | 968 ccl-encode-to-ucs-2) |
969 (charset-property charset 'ccl-program))) | 969 (charset-property charset 'ccl-program))) |
970 (ccl-vector (make-vector 8 0))) | 970 (ccl-vector (make-vector 8 0)) |
971 font-instance) | |
971 (if (display-graphic-p (selected-frame)) | 972 (if (display-graphic-p (selected-frame)) |
972 (list | 973 (list |
973 (font-instance-name | 974 (if (setq font-instance |
974 (face-font-instance (or (get-char-property pos 'face) | 975 (face-font-instance (or (get-char-property pos 'face) |
975 'default) | 976 'default) |
976 (selected-window) | 977 (selected-window) |
977 charset)) | 978 charset)) |
979 (font-instance-name font-instance) | |
980 "[no font available]") | |
978 (cond | 981 (cond |
979 ((and ccl (eq 'x (frame-type frame))) | 982 ((and ccl (eq 'x (frame-type frame))) |
980 (setq char (split-char char)) | 983 (setq char (split-char char)) |
981 (aset ccl-vector 0 (charset-id charset)) | 984 (aset ccl-vector 0 (charset-id charset)) |
982 (aset ccl-vector 1 (second char)) | 985 (aset ccl-vector 1 (second char)) |