# HG changeset patch # User Aidan Kehoe # Date 1269615988 0 # Node ID b50624d3ae55cc022205c16069cbb1c29fb0d5a9 # Parent 17fe69fff7fa0087481151a4e26818ae3d3cf79f open-database.message diff -r 17fe69fff7fa -r b50624d3ae55 lisp/ChangeLog --- a/lisp/ChangeLog Tue Mar 23 17:36:18 2010 +0000 +++ b/lisp/ChangeLog Fri Mar 26 15:06:28 2010 +0000 @@ -1,3 +1,10 @@ +2010-03-26 Aidan Kehoe + + * descr-text.el (describe-char-display): + Behave better on builds without database support, and for + characters where no font is available. Especially relevant on + Win32. + 2010-03-23 Aidan Kehoe * x-win-xfree86.el (x-win-init-xfree86): diff -r 17fe69fff7fa -r b50624d3ae55 lisp/descr-text.el --- a/lisp/descr-text.el Tue Mar 23 17:36:18 2010 +0000 +++ b/lisp/descr-text.el Fri Mar 26 15:06:28 2010 +0000 @@ -257,14 +257,6 @@ file)) ;; XEmacs additions, from here until `describe-char-unicode-data' -(defcustom describe-char-use-cache t - "Whether `describe-char' should use a DBM or Berkeley DB cache. -This speeds up navigation of `describe-char-unicodedata-file', and makes -navigation of `describe-char-unihan-file' reasonable." - :group 'mule - :type '(choice (const :tag "None" nil) - file)) - (defcustom describe-char-unihan-file nil "Location of Unihan file. This the Unihan.txt file from the Unicode Consortium, used for diagnostics. @@ -290,6 +282,14 @@ (and (featurep 'berkeley-db) 'berkeley-db)) "The DB format to use for the `describe-char' cache, or nil if no cache.") +(defcustom describe-char-use-cache (not (null unidata-database-format)) + "Whether `describe-char' should use a DBM or Berkeley DB cache. +This speeds up navigation of `describe-char-unicodedata-file', and makes +navigation of `describe-char-unihan-file' reasonable." + :group 'mule + :type '(choice (const :tag "None" nil) + file)) + (defvar describe-char-unihan-field-descriptions #s(hash-table :test equal :data ("kAccountingNumeric" @@ -967,14 +967,17 @@ (ccl (or (and (charset-property charset 'encode-as-utf-8) ccl-encode-to-ucs-2) (charset-property charset 'ccl-program))) - (ccl-vector (make-vector 8 0))) + (ccl-vector (make-vector 8 0)) + font-instance) (if (display-graphic-p (selected-frame)) (list - (font-instance-name - (face-font-instance (or (get-char-property pos 'face) - 'default) - (selected-window) - charset)) + (if (setq font-instance + (face-font-instance (or (get-char-property pos 'face) + 'default) + (selected-window) + charset)) + (font-instance-name font-instance) + "[no font available]") (cond ((and ccl (eq 'x (frame-type frame))) (setq char (split-char char))