(widget-put widget :children children)
(custom-face-state-set widget))))))
+(defun cus--face-link (widget _format)
+ (let ((face (intern (widget-get widget :value))))
+ (widget-create-child-and-convert
+ widget 'face-link
+ :button-face 'link
+ :tag "link"
+ :action (lambda (&rest _x)
+ (customize-face face)))))
+
(defvar custom-face-menu nil
"If non-nil, an alist of actions for the `custom-face' widget.
(define-widget 'face 'symbol
"A Lisp face name (with sample)."
- :format "%{%t%}: (%{sample%}) %v"
+ :format "%f %{%t%}: (%{sample%}) %v"
:tag "Face"
:value 'default
:sample-face-get 'widget-face-sample-face-get
obarray #'facep 'strict)
:prompt-match 'facep
:prompt-history 'widget-face-prompt-value-history
+ :format-handler 'cus--face-link
:validate (lambda (widget)
(unless (facep (widget-value widget))
(widget-put widget