[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to show *Warnings* buffer at startup time?
From: |
Kenichi Handa |
Subject: |
How to show *Warnings* buffer at startup time? |
Date: |
Wed, 18 Mar 2009 22:22:21 +0900 |
I'm going to change create-fontset-from-x-resource
(fontset.el) as this:
@@ -1049,8 +1058,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)))))
;;
But the *Warnings* buffer doesn't show up at startup time
even if create-fontset-from-fontset-spec causes an error.
Could someone tell me what is wrong with the above change?
If it is because the X frame is not yet created at that
time, don't we need something like the attached patch?
---
Kenichi Handa
address@hidden
--- startup.el.~1.527.~ 2009-02-23 09:51:02.000000000 +0900
+++ startup.el 2009-03-18 22:16:35.000000000 +0900
@@ -1235,7 +1235,13 @@
(if (and (boundp 'x-session-previous-id)
(stringp x-session-previous-id))
(with-no-warnings
- (emacs-session-restore x-session-previous-id))))
+ (emacs-session-restore x-session-previous-id)))
+
+ (let ((warning-buf (get-buffer "*Warnings*")))
+ (if (and warning-buf
+ (not (get-buffer-window warning-buf))
+ (> (buffer-size warning-buf) 0))
+ (display-buffer warning-buf))))
(defcustom initial-scratch-message (purecopy "\
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
- How to show *Warnings* buffer at startup time?,
Kenichi Handa <=