From: teranisi Date: Fri, 26 Dec 2003 01:20:25 +0000 (+0000) Subject: * wl-vars.el (wl-demo-icon-name-alist): New variable. X-Git-Tag: wl-2_11_23~15 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b878254e896bb767c1d89f869d7adaa3d1d877a7;p=elisp%2Fwanderlust.git * wl-vars.el (wl-demo-icon-name-alist): New variable. * wl-demo.el (wl-demo-icon-name): Define as function. (wl-demo-insert-image): Use it. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index e904bc5..518e0d5 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2003-12-26 Yuuichi Teranishi + + * wl-vars.el (wl-demo-icon-name-alist): New variable. + + * wl-demo.el (wl-demo-icon-name): Define as function. + (wl-demo-insert-image): Use it. + 2003-12-19 Tetsurou Okazaki * wl-vars.el (wl-draft-mime-bcc-body): Customization type fix. diff --git a/wl/wl-demo.el b/wl/wl-demo.el index 9e85263..39089cf 100644 --- a/wl/wl-demo.el +++ b/wl/wl-demo.el @@ -39,13 +39,12 @@ (require 'wl-version) (require 'wl-highlight) -(defconst wl-demo-icon-name - (concat "wl-" (wl-version-status) - (if (string-match "^... Dec \\([ 01][0-9]\\|2[0-5]\\)" - (current-time-string)) - "-xmas-logo" - "-logo")) - "Basename of the logo file.") +(defun wl-demo-icon-name () + "A function to determine logo file name." + (catch 'found + (dolist (pair wl-demo-icon-name-alist) + (when (eval (car pair)) + (throw 'found (eval (cdr pair))))))) (defvar wl-logo-ascii "\ o$ oo$$$$$$ooo @@ -134,11 +133,11 @@ Yet Another Message Interface On Emacsen" IMAGE-TYPE specifies what a type of image should be displayed. Return a number of lines that an image occupies in the buffer." (let ((file (cond ((eq 'xpm image-type) - (concat wl-demo-icon-name ".xpm")) + (concat (wl-demo-icon-name) ".xpm")) ((eq 'bitmap image-type) - (concat wl-demo-icon-name ".img")) + (concat (wl-demo-icon-name) ".img")) ((eq 'xbm image-type) - (concat wl-demo-icon-name ".xbm")))) + (concat (wl-demo-icon-name) ".xbm")))) image width height) (when (featurep 'xemacs) (when (boundp 'default-gutter-visible-p) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 159b436..4cf3e50 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -481,6 +481,18 @@ You had better set this variable if you set 'wl-insert-mail-followup-to' as t." :type 'boolean :group 'wl-pref) +(defcustom wl-demo-icon-name-alist + '(((string-match "^... Dec \\([ 01][0-9]\\|2[0-5]\\)" (current-time-string)) + . + (concat "wl-" (wl-version-status) "-xmas-logo")) + (t + . + (concat "wl-" (wl-version-status) "-logo"))) + "An alist to determine the basename of the logo file." + :type '(repeat (cons (symbol :tag "condition") + (symbol :tag "file name"))) + :group 'wl-pref) + (defcustom wl-envelope-from nil "*Envelope From used in SMTP. If nil, `wl-from' is used."