diff options
| author | Eli Zaretskii | 2013-10-02 21:44:40 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-10-02 21:44:40 +0300 |
| commit | ffe759ebe34411c0ab85158a1696e1fe62ada975 (patch) | |
| tree | ac32e748772bb63f340326a4260400982d03b380 | |
| parent | d797af5518e6e918bd35bfe1c84c9b9ed5545eae (diff) | |
| download | emacs-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/NEWS | 4 | ||||
| -rw-r--r-- | lisp/frame.el | 10 |
2 files changed, 9 insertions, 5 deletions
| @@ -661,6 +661,10 @@ for something (not just adding elements to it), it ought not to affect you. | |||
| 661 | This includes `x-popup-menu', `x-popup-dialog', `message-box', | 661 | This includes `x-popup-menu', `x-popup-dialog', `message-box', |
| 662 | `yes-or-no-p', etc. | 662 | `yes-or-no-p', etc. |
| 663 | 663 | ||
| 664 | The function `display-popup-menus-p' will now return non-nil for a | ||
| 665 | display or frame whenever a mouse is supported on that display or | ||
| 666 | frame. | ||
| 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. |
| 1311 | DISPLAY can be a display name, a frame, or nil (meaning the selected | 1314 | DISPLAY can be a display name, a frame, or nil (meaning the selected |
| 1312 | frame's display). | 1315 | frame's display). |
| 1313 | Support for popup menus requires that the mouse be available." | 1316 | Support 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. |