changeset 102638:6f3f8314ba75

(create-default-fontset): New function. (create-fontset-from-x-resource): Use display-warning instead of message.
author Kenichi Handa <handa@m17n.org>
date Thu, 19 Mar 2009 00:55:36 +0000
parents 7780afc47c49
children 0ad88f8fc5a6
files lisp/international/fontset.el
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/fontset.el	Thu Mar 19 00:46:35 2009 +0000
+++ b/lisp/international/fontset.el	Thu Mar 19 00:55:36 2009 +0000
@@ -579,6 +579,16 @@
 
   (set-fontset-font "fontset-default" '(#xE000 . #xF8FF) nil))
 
+(defun create-default-fontset ()
+  "Create the default fontset.
+Internal use only.  Should be called at startup time."
+  (condition-case err
+      (setup-default-fontset)
+    (error (display-warning
+	    'initialization
+	    (format "Creation of the default fontsets failed: %s" err)
+	    :error))))
+
 ;; These are the registered registries/encodings from
 ;; ftp://ftp.x.org/pub/DOCS/registry 2001/06/01
 
@@ -1049,8 +1059,11 @@
     (while (setq fontset-spec (x-get-resource (format "fontset-%d" idx)
 					      (format "Fontset-%d" idx)))
       (condition-case nil
-	  (create-fontset-from-fontset-spec fontset-spec t 'noerror)
-	(error (message "Fontset-%d: invalid specification in X resource" idx)))
+	  (create-fontset-from-fontset-spec fontset-spec t)
+	(error (display-warning
+		'initialization
+		(format "Fontset-%d: invalid specification in X resource" idx)
+		:warning)))
       (setq idx (1+ idx)))))
 
 ;;