1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-20 13:00:51 -07:00

Make tty default face show the face widget in customize

* lisp/wid-edit.el (widget-color-match): Allow unspecified-fg
and unspecified-bg as color names.
This commit is contained in:
Jared Finder 2025-12-25 21:39:29 -08:00 committed by Eli Zaretskii
parent 61b1554332
commit 28aa9a7641

View file

@ -4362,7 +4362,10 @@ is inline."
"Non-nil if VALUE is a defined color or a RGB hex string."
(and (stringp value)
(or (color-defined-p value)
(string-match-p "^#\\(?:[[:xdigit:]]\\{3\\}\\)\\{1,4\\}$" value))))
(string-match-p "^#\\(?:[[:xdigit:]]\\{3\\}\\)\\{1,4\\}$" value)
;; TTYs also allow unspecified-fg / unspecified-bg as color
;; values even though they are technically not colors.
(string-match-p "^unspecified-\\(?:fg\\|bg\\)$" value))))
(defun widget-color-validate (widget)
"Check that WIDGET's value is a valid color."