From: Eli Zaretskii Date: Wed, 2 Oct 2013 18:44:40 +0000 (+0300) Subject: Fix display-mouse-p and display-popup-menus-p for TTYs; menus in Custom work. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1328^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ffe759ebe34411c0ab85158a1696e1fe62ada975;p=emacs.git Fix display-mouse-p and display-popup-menus-p for TTYs; menus in Custom work. --- diff --git a/etc/NEWS b/etc/NEWS index 42937210c46..e1ca917eb63 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -661,6 +661,10 @@ for something (not just adding elements to it), it ought not to affect you. This includes `x-popup-menu', `x-popup-dialog', `message-box', `yes-or-no-p', etc. +The function `display-popup-menus-p' will now return non-nil for a +display or frame whenever a mouse is supported on that display or +frame. + ** New bool-vector set operation functions: *** `bool-vector-exclusive-or' *** `bool-vector-union' diff --git a/lisp/frame.el b/lisp/frame.el index 8e336629123..70a0189effe 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1304,17 +1304,17 @@ frame's display)." xterm-mouse-mode) ;; t-mouse is distributed with the GPM package. It doesn't have ;; a toggle. - (featurep 't-mouse)))))) + (featurep 't-mouse) + ;; No way to check whether a w32 console has a mouse, assume + ;; it always does. + (boundp 'w32-use-full-screen-buffer)))))) (defun display-popup-menus-p (&optional display) "Return non-nil if popup menus are supported on DISPLAY. DISPLAY can be a display name, a frame, or nil (meaning the selected frame's display). Support for popup menus requires that the mouse be available." - (and - (let ((frame-type (framep-on-display display))) - (memq frame-type '(x w32 pc ns))) - (display-mouse-p display))) + (display-mouse-p display)) (defun display-graphic-p (&optional display) "Return non-nil if DISPLAY is a graphic display.