From 0fe3602a281b967ab1709da511c88f763a86e62a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 28 Sep 2013 14:04:49 +0300 Subject: [PATCH] Define tty-menu-* faces via defface. --- lisp/faces.el | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index b6e85e96276..c891da2f9ba 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2140,15 +2140,7 @@ terminal type to a different value." (defun tty-set-up-initial-frame-faces () (let ((frame (selected-frame))) (frame-set-background-mode frame t) - (face-set-after-frame-default frame) - (make-face 'tty-menu-enabled-face) - (make-face 'tty-menu-disabled-face) - (make-face 'tty-menu-selected-face) - (set-face-foreground 'tty-menu-enabled-face "yellow") - (set-face-foreground 'tty-menu-disabled-face "white") - (set-face-background 'tty-menu-enabled-face "blue") - (set-face-background 'tty-menu-disabled-face "blue") - (set-face-background 'tty-menu-selected-face "red"))) + (face-set-after-frame-default frame))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2557,6 +2549,26 @@ It is used for characters of no fonts too." :version "24.1" :group 'basic-faces) +;; Faces for TTY menus. +(defface tty-menu-enabled-face + '((t + :foreground "yellow" :background "blue" :weight bold)) + "Face for displaying enabled items in TTY menus." + :group 'basic-faces) + +(defface tty-menu-disabled-face + '((((class color) (min-colors 16)) + :foreground "lightgray" :background "blue") + (t + :foreground "white" :background "blue")) + "Face for displaying disabled items in TTY menus." + :group 'basic-faces) + +(defface tty-menu-selected-face + '((t :background "red")) + "Face for displaying the currently selected item in TTY menus." + :group 'basic-faces) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Manipulating font names. -- 2.39.2