comparison lisp/wid-edit.el @ 38235:c6078ee53ddf

(widget-color-sample-face-get): Return ((foreground-color . COLOR)) instead of constructing a face.
author Richard M. Stallman <rms@gnu.org>
date Fri, 29 Jun 2001 17:50:05 +0000
parents bd650fe3380e
children 7124795193df
comparison
equal deleted inserted replaced
38234:aa4a82ab70c4 38235:c6078ee53ddf
3398 (defun widget-color-sample-face-get (widget) 3398 (defun widget-color-sample-face-get (widget)
3399 (let* ((value (condition-case nil 3399 (let* ((value (condition-case nil
3400 (widget-value widget) 3400 (widget-value widget)
3401 (error (widget-get widget :value))))) 3401 (error (widget-get widget :value)))))
3402 (if (color-defined-p value) 3402 (if (color-defined-p value)
3403 (let ((symbol (intern (concat "fg:" value)))) 3403 (list (cons 'foreground-color value))
3404 (condition-case nil
3405 (facemenu-get-face symbol)
3406 (error 'default)))
3407 'default))) 3404 'default)))
3408 3405
3409 (defun widget-color-action (widget &optional event) 3406 (defun widget-color-action (widget &optional event)
3410 "Prompt for a color." 3407 "Prompt for a color."
3411 (let* ((tag (widget-apply widget :menu-tag-get)) 3408 (let* ((tag (widget-apply widget :menu-tag-get))