(defalias-maybe 'create-image 'ignore)
(defalias-maybe 'device-on-window-system-p 'ignore)
(defalias-maybe 'display-graphic-p 'ignore)
+ (defalias-maybe 'fancy-splash-insert 'ignore)
(defalias-maybe 'frame-char-height 'ignore)
(defalias-maybe 'frame-char-width 'ignore)
(defalias-maybe 'frame-parameter 'ignore)
(defalias-maybe 'insert-image 'ignore)
(defalias-maybe 'make-extent 'ignore)
(defalias-maybe 'make-glyph 'ignore)
+ (defalias-maybe 'propertize 'ignore)
(defalias-maybe 'set-extent-end-glyph 'ignore)
(defalias-maybe 'set-glyph-face 'ignore)
(defalias-maybe 'set-specifier 'ignore)
(plist-put (cdr image) ':foreground fg))))
(setq rest (/ (- (* wh (frame-char-height)) lh 1)
(frame-char-height)))
- (insert-char ?\ (max 0 (/ (- (* (frame-char-width) (1+ ww)) lw)
- 2 (frame-char-width))))
+ (insert (propertize " " 'display
+ (list 'space ':align-to
+ (max 0 (/ (- (* (frame-char-width)
+ (1+ ww)) lw)
+ 2 (frame-char-width))))))
(insert-image image))
(t
(insert image)
(insert-char ?\n (max 0 (/ (- rest 4) 2)))
(goto-char (point-max))
(insert "\n")
- (let ((start (point)))
- (insert (format (cond ((<= rest 2)
- "version %s - \"%s\"\n%s")
- ((eq rest 3)
- "version %s - \"%s\"\n\n%s")
- (t
- "\nversion %s - \"%s\"\n\n%s"))
- (product-version-string (product-find 'wl-version))
- (product-code-name (product-find 'wl-version))
- wl-demo-copyright-notice))
- (put-text-property start (point) 'face 'wl-highlight-demo-face)
+ (let ((start (point))
+ (text (format (cond ((<= rest 2)
+ "version %s - \"%s\"\n%s")
+ ((eq rest 3)
+ "version %s - \"%s\"\n\n%s")
+ (t
+ "\nversion %s - \"%s\"\n\n%s"))
+ (product-version-string (product-find 'wl-version))
+ (product-code-name (product-find 'wl-version))
+ wl-demo-copyright-notice)))
+ (if wl-on-emacs21
+ (let ((bg (face-background 'wl-highlight-demo-face))
+ (fg (face-foreground 'wl-highlight-demo-face))
+ (face '(variable-pitch)))
+ (if (stringp bg)
+ (setcdr face (list ':background bg)))
+ (if (stringp fg)
+ (setq face (nconc face (list ':foreground fg))))
+ (let (fancy-splash-help-echo)
+ (fancy-splash-insert ':face face text)))
+ (insert text)
+ (put-text-property start (point) 'face 'wl-highlight-demo-face))
(let ((fill-column ww))
(center-region start (point))))
(goto-char (point-min))
wl-unplugged-image (find-image `((:type xpm
:file ,wl-unplugged-icon
:ascent center))))))
- (let ((props (when (display-mouse-p)
- (list 'local-map (purecopy (make-mode-line-mouse2-map
- #'wl-toggle-plugged))
- 'help-echo "mouse-2 toggles plugged status"))))
- (if (display-graphic-p)
- (setq wl-modeline-plug-state-on
- (apply 'propertize wl-plug-state-indicator-on
- `(,@props display ,wl-plugged-image))
- wl-modeline-plug-state-off
- (apply 'propertize wl-plug-state-indicator-off
- `(,@props display ,wl-unplugged-image)))
- (setq wl-modeline-plug-state-on
- (apply 'propertize wl-plug-state-indicator-on props)
- wl-modeline-plug-state-off
- (apply 'propertize wl-plug-state-indicator-off props)))))
+ (if (display-mouse-p)
+ (let ((props (list 'local-map (purecopy (make-mode-line-mouse2-map
+ #'wl-toggle-plugged))
+ 'help-echo "mouse-2 toggles plugged status")))
+ (if (display-graphic-p)
+ (setq wl-modeline-plug-state-on
+ (apply 'propertize wl-plug-state-indicator-on
+ `(display ,wl-plugged-image ,@props))
+ wl-modeline-plug-state-off
+ (apply 'propertize wl-plug-state-indicator-off
+ `(display ,wl-unplugged-image ,@props)))
+ (setq wl-modeline-plug-state-on
+ (apply 'propertize wl-plug-state-indicator-on props)
+ wl-modeline-plug-state-off
+ (apply 'propertize wl-plug-state-indicator-off props))))
+ (setq wl-modeline-plug-state-on wl-plug-state-indicator-on
+ wl-modeline-plug-state-off wl-plug-state-indicator-off)))
(defun wl-biff-init-icons ()
(unless wl-biff-mail-image
wl-biff-nomail-image (find-image
`((:type xpm :file ,wl-biff-nomail-icon
:ascent center))))))
- (let ((props (when (display-mouse-p)
- (list 'local-map (purecopy (make-mode-line-mouse2-map
- (lambda nil
- (call-interactively
- 'wl-biff-check-folders))))
- 'help-echo "mouse-2 checks new mails"))))
- (if (display-graphic-p)
- (setq wl-modeline-biff-state-on
- (apply 'propertize wl-biff-state-indicator-on
- `(,@props display ,wl-biff-mail-image))
- wl-modeline-biff-state-off
- (apply 'propertize wl-biff-state-indicator-off
- `(,@props display ,wl-biff-nomail-image)))
- (setq wl-modeline-biff-state-on
- (apply 'propertize wl-biff-state-indicator-on props)
- wl-modeline-biff-state-off
- (apply 'propertize wl-biff-state-indicator-off props)))))
+ (if (display-mouse-p)
+ (let ((props (list 'local-map (purecopy (make-mode-line-mouse2-map
+ (lambda nil
+ (call-interactively
+ 'wl-biff-check-folders))))
+ 'help-echo "mouse-2 checks new mails")))
+ (if (display-graphic-p)
+ (setq wl-modeline-biff-state-on
+ (apply 'propertize wl-biff-state-indicator-on
+ `(display ,wl-biff-mail-image ,@props))
+ wl-modeline-biff-state-off
+ (apply 'propertize wl-biff-state-indicator-off
+ `(display ,wl-biff-nomail-image ,@props)))
+ (setq wl-modeline-biff-state-on
+ (apply 'propertize wl-biff-state-indicator-on props)
+ wl-modeline-biff-state-off
+ (apply 'propertize wl-biff-state-indicator-off props))))
+ (setq wl-modeline-biff-state-on wl-biff-state-indicator-on
+ wl-modeline-biff-state-off wl-biff-state-indicator-off)))
(defun wl-make-date-string ()
(format-time-string "%a, %d %b %Y %T %z"))