+(defun wl-demo-setup-properties ()
+ "Set up properties of the demo buffer."
+ (cond
+ (wl-on-emacs21
+ ;; I think there should be a better way to set face background
+ ;; for the buffer only. But I don't know how to do it on Emacs21.
+ (goto-char (point-max))
+ (dotimes (i (- (window-height)
+ (count-lines (point-min) (point))))
+ (insert ?\n))
+ (let* ((fg (face-foreground 'wl-highlight-demo-face))
+ (bg (face-background 'wl-highlight-demo-face))
+ (oblique (nconc '(variable-pitch :slant oblique)
+ (when (stringp bg)
+ (list ':background bg))
+ (when (stringp fg)
+ (list ':foreground fg))))
+ (start (text-property-any (point-min) (point-max) 'fixed-width t))
+ end)
+ (if start
+ (progn
+ (put-text-property (point-min) start 'face oblique)
+ (setq end (or (text-property-not-all start (point-max)
+ 'fixed-width t)
+ (point-max)))
+ (put-text-property start end 'face
+ (nconc '(wl-highlight-logo-face)
+ (when (stringp bg)
+ (list ':background bg))))
+ (put-text-property end (point-max) 'face oblique))
+ (put-text-property (point-min) (point-max) 'face oblique))))
+ ((and (featurep 'xemacs)
+ (face-background-name 'wl-highlight-demo-face))
+ (set-face-background 'default
+ (face-background-name 'wl-highlight-demo-face)
+ (current-buffer)))
+ (t
+ (goto-char (point-max))
+ (dotimes (i (- (window-height)
+ (count-lines (point-min) (point))))
+ (insert ?\n))
+ (let ((start (text-property-any (point-min) (point-max) 'fixed-width t))
+ end)
+ (if start
+ (progn
+ (put-text-property (point-min) start 'face 'wl-highlight-demo-face)
+ (setq end (or (text-property-not-all start (point-max)
+ 'fixed-width t)
+ (point-max)))
+ (put-text-property start end 'face 'wl-highlight-logo-face)
+ (put-text-property end (point-max) 'face 'wl-highlight-demo-face))
+ (put-text-property (point-min) (point-max)
+ 'face 'wl-highlight-demo-face))))))
+