aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-10-02 21:44:40 +0300
committerEli Zaretskii2013-10-02 21:44:40 +0300
commitffe759ebe34411c0ab85158a1696e1fe62ada975 (patch)
treeac32e748772bb63f340326a4260400982d03b380
parentd797af5518e6e918bd35bfe1c84c9b9ed5545eae (diff)
downloademacs-ffe759ebe34411c0ab85158a1696e1fe62ada975.tar.gz
emacs-ffe759ebe34411c0ab85158a1696e1fe62ada975.zip
Fix display-mouse-p and display-popup-menus-p for TTYs; menus in Custom work.
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/frame.el10
2 files changed, 9 insertions, 5 deletions
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.
661This includes `x-popup-menu', `x-popup-dialog', `message-box', 661This includes `x-popup-menu', `x-popup-dialog', `message-box',
662`yes-or-no-p', etc. 662`yes-or-no-p', etc.
663 663
664The function `display-popup-menus-p' will now return non-nil for a
665display or frame whenever a mouse is supported on that display or
666frame.
667
664** New bool-vector set operation functions: 668** New bool-vector set operation functions:
665*** `bool-vector-exclusive-or' 669*** `bool-vector-exclusive-or'
666*** `bool-vector-union' 670*** `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)."
1304 xterm-mouse-mode) 1304 xterm-mouse-mode)
1305 ;; t-mouse is distributed with the GPM package. It doesn't have 1305 ;; t-mouse is distributed with the GPM package. It doesn't have
1306 ;; a toggle. 1306 ;; a toggle.
1307 (featurep 't-mouse)))))) 1307 (featurep 't-mouse)
1308 ;; No way to check whether a w32 console has a mouse, assume
1309 ;; it always does.
1310 (boundp 'w32-use-full-screen-buffer))))))
1308 1311
1309(defun display-popup-menus-p (&optional display) 1312(defun display-popup-menus-p (&optional display)
1310 "Return non-nil if popup menus are supported on DISPLAY. 1313 "Return non-nil if popup menus are supported on DISPLAY.
1311DISPLAY can be a display name, a frame, or nil (meaning the selected 1314DISPLAY can be a display name, a frame, or nil (meaning the selected
1312frame's display). 1315frame's display).
1313Support for popup menus requires that the mouse be available." 1316Support for popup menus requires that the mouse be available."
1314 (and 1317 (display-mouse-p display))
1315 (let ((frame-type (framep-on-display display)))
1316 (memq frame-type '(x w32 pc ns)))
1317 (display-mouse-p display)))
1318 1318
1319(defun display-graphic-p (&optional display) 1319(defun display-graphic-p (&optional display)
1320 "Return non-nil if DISPLAY is a graphic display. 1320 "Return non-nil if DISPLAY is a graphic display.