+ (when (featurep 'toolbar)
+ (if (and message-use-toolbar
+ (message-xmas-setup-toolbar message-toolbar))
+ (let* ((bar (or (intern-soft (format "%s-toolbar" message-use-toolbar))
+ 'default-toolbar))
+ (bars (delq bar (list 'top-toolbar 'bottom-toolbar
+ 'right-toolbar 'left-toolbar)))
+ hw)
+ (while bars
+ (remove-specifier (symbol-value (pop bars)) (current-buffer)))
+ (unless (eq bar 'default-toolbar)
+ (set-specifier default-toolbar nil (current-buffer)))
+ (set-specifier (symbol-value bar) message-toolbar (current-buffer))
+ (when (setq hw (cdr (assq message-use-toolbar
+ '((default . default-toolbar-height)
+ (top . top-toolbar-height)
+ (bottom . bottom-toolbar-height)))))
+ (set-specifier (symbol-value hw) (car message-toolbar-thickness)
+ (current-buffer)))
+ (when (setq hw (cdr (assq message-use-toolbar
+ '((default . default-toolbar-width)
+ (right . right-toolbar-width)
+ (left . left-toolbar-width)))))
+ (set-specifier (symbol-value hw) (cdr message-toolbar-thickness)
+ (current-buffer))))
+ (set-specifier default-toolbar nil (current-buffer))
+ (remove-specifier top-toolbar (current-buffer))
+ (remove-specifier bottom-toolbar (current-buffer))
+ (remove-specifier right-toolbar (current-buffer))
+ (remove-specifier left-toolbar (current-buffer)))
+ (set-specifier default-toolbar-visible-p t (current-buffer))
+ (set-specifier top-toolbar-visible-p t (current-buffer))
+ (set-specifier bottom-toolbar-visible-p t (current-buffer))
+ (set-specifier right-toolbar-visible-p t (current-buffer))
+ (set-specifier left-toolbar-visible-p t (current-buffer))))