From: teranisi Date: Mon, 5 Jan 2004 15:51:43 +0000 (+0000) Subject: * wl-vars.el (wl-demo-image-filter-alist): Set default value to nil. X-Git-Tag: wl-2_11_23~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1a64541c3e7904c77e1c945af32517398df87fc1;p=elisp%2Fwanderlust.git * wl-vars.el (wl-demo-image-filter-alist): Set default value to nil. (wl-demo-background-color): Changed default value. * wl-highlight.el (wl-highlight-demo-face): Changed default foreground color. * wl-demo.el (wl-demo-set-background-color): New function. (wl-demo): Call it. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index b2a62a9..aa8a5f6 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,14 @@ +2004-01-05 Yuuichi Teranishi + + * wl-vars.el (wl-demo-image-filter-alist): Set default value to nil. + (wl-demo-background-color): Changed default value. + + * wl-highlight.el (wl-highlight-demo-face): Changed default foreground + color. + + * wl-demo.el (wl-demo-set-background-color): New function. + (wl-demo): Call it. + 2004-01-03 Yoichi NAKAYAMA * wl-address.el (wl-address-delete): Avoid mis-deleting. diff --git a/wl/wl-demo.el b/wl/wl-demo.el index da409d4..e3df548 100644 --- a/wl/wl-demo.el +++ b/wl/wl-demo.el @@ -287,6 +287,24 @@ Return a number of lines that an image occupies in the buffer." (max 0 (/ (1+ (- (window-width) width)) 2))) (count-lines (point-min) (goto-char (point-max)))))) +(defun wl-demo-set-background-color () + "Set background color of the demo buffer." + (cond + (wl-on-emacs21 + ;; I think there should be a better way to set face background in the + ;; buffer local way. But I don't know how to do it on Emacs21. + (goto-char (point-max)) + (dotimes (i (- (window-height) + (count-lines (point-min) (point)) 1)) ; 1 means modeline + (insert ?\n)) + (put-text-property (point-min) (point-max) + 'face 'wl-highlight-demo-face) + (set-face-background 'wl-highlight-demo-face + wl-demo-background-color)) + ((featurep 'xemacs) + (set-face-background 'default wl-demo-background-color + (current-buffer))))) + (defun wl-demo-insert-text (height) "Insert a version and the copyright message after a logo image. HEIGHT should be a number of lines that an image occupies in the buffer." @@ -348,6 +366,8 @@ argument." (set (make-local-variable 'tab-stop-list) '(8 16 24 32 40 48 56 64 72 80 88 96 104 112 120)) (wl-demo-insert-text (wl-demo-insert-image image-type)) + (when wl-demo-background-color + (wl-demo-set-background-color)) (set-buffer-modified-p nil) (goto-char (point-min)) (sit-for (if (featurep 'lisp-float-type) diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index 227735ca..31fb814 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -600,10 +600,10 @@ (:foreground "green")) (((class color) (background dark)) - (:foreground "GreenYellow")) + (:foreground "#006600")) (((class color) (background light)) - (:foreground "blue2"))) + (:foreground "#006600"))) "Face used for displaying demo." :group 'wl-faces) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index b7ea3d7..de39ea0 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -493,15 +493,14 @@ You had better set this variable if you set 'wl-insert-mail-followup-to' as t." (symbol :tag "file name"))) :group 'wl-pref) -(defcustom wl-demo-image-filter-alist - '((xpm . wl-demo-xpm-set-background)) +(defcustom wl-demo-image-filter-alist nil "An alist of image type and filter function." :type '(repeat (cons symbol function)) :group 'wl-pref) -(defcustom wl-demo-background-color "None" +(defcustom wl-demo-background-color "#d9ffd9" "The color name for demo background. -Used in the filter function `wl-demo-filter-xpm-background'." +If nil, the default face background is used." :type '(string :tag "Color name") :group 'wl-pref)