From 5877bb8d7e55eda3f81a36bfabe4dd816a34269f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 5 Sep 2013 15:43:11 +0300 Subject: [PATCH] Removed unnecessary tests for GUI sessions and created menu faces. --- lisp/dired.el | 2 +- lisp/faces.el | 11 +++++++++-- src/menu.c | 7 ------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index f830623a255..b9f974234fb 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -4352,7 +4352,7 @@ instead. ;;;*** -;;;### (autoloads nil "dired-x" "dired-x.el" "1419d865898f84c17f172320e578380c") +;;;### (autoloads nil "dired-x" "dired-x.el" "130484d4c94bb9929c210774f9e475f5") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ diff --git a/lisp/faces.el b/lisp/faces.el index 9a34aec2549..f5957d9dbad 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2135,8 +2135,15 @@ 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))) - + (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"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/menu.c b/src/menu.c index 2b199ffdf09..b9d1b7668b1 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1077,8 +1077,6 @@ no quit occurs and `x-popup-menu' returns nil. */) { bool get_current_pos_p = 0; - check_window_system (SELECTED_FRAME ()); - /* Decode the first argument: find the window and the coordinates. */ if (EQ (position, Qt) || (CONSP (position) && (EQ (XCAR (position), Qmenu_bar) @@ -1194,11 +1192,6 @@ no quit occurs and `x-popup-menu' returns nil. */) xpos += XINT (x); ypos += XINT (y); - /* FIXME: Find a more general check! */ - if (!(FRAME_X_P (f) || FRAME_MSDOS_P (f) - || FRAME_W32_P (f) || FRAME_NS_P (f))) - error ("Can not put GUI menu on this terminal"); - XSETFRAME (Vmenu_updating_frame, f); } #endif /* HAVE_MENUS */ -- 2.39.2