+2003-12-26 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * 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 <okazaki@be.to>
* wl-vars.el (wl-draft-mime-bcc-body): Customization type fix.
(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
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)
: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."