Commit ffe759eb authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix display-mouse-p and display-popup-menus-p for TTYs; menus in Custom work.

parent d797af55
......@@ -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
** New bool-vector set operation functions:
*** `bool-vector-exclusive-or'
*** `bool-vector-union'
......@@ -1304,17 +1304,17 @@ frame's display)."
;; 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."
(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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment