diff options
author | Jason Rumney <jasonr@gnu.org> | 2008-06-11 00:25:24 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2008-06-11 00:25:24 +0000 |
commit | 14f3467e1fcceaf23f71f69a8b99a41a05827956 (patch) | |
tree | 647c0b3c5c7cdcd55fc95074ee307ad660dd23da | |
parent | a83983874d7c6aaeba299c7ed03c132a0a5b4794 (diff) | |
download | emacs-14f3467e1fcceaf23f71f69a8b99a41a05827956.tar.gz |
* term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
Use tmm-menubar if menu is disabled in this frame.
* menu-bar.el (menu-bar-open): Determine how to open menu bar
from frame type, per documentation. Add w32 case.
-rw-r--r-- | lisp/ChangeLog | 8 | ||||
-rw-r--r-- | lisp/menu-bar.el | 13 | ||||
-rw-r--r-- | lisp/term/w32-win.el | 17 |
3 files changed, 27 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 254bc97bf8e..c1a72c69428 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2008-06-11 Jason Rumney <jasonr@gnu.org> + + * term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open. + Use tmm-menubar if menu is disabled in this frame. + + * menu-bar.el (menu-bar-open): Determine how to open menu bar + from frame type, per documentation. Add w32 case. + 2008-06-10 Stefan Monnier <monnier@iro.umontreal.ca> * minibuffer.el (completion--merge-suffix): New function. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 710022b9191..a7ca5981110 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1903,14 +1903,17 @@ See `menu-bar-mode' for more information." This function decides which method to use to access the menu depending on FRAME's terminal device. On X displays, it calls -`x-menu-bar-open'; otherwise it calls `tmm-menubar'. +`x-menu-bar-open'; on Windows, `w32-menu-bar-open' otherwise it +calls `tmm-menubar'. If FRAME is nil or not given, use the selected frame." (interactive) - (if (eq window-system 'x) - (x-menu-bar-open frame) - (with-selected-frame (or frame (selected-frame)) - (tmm-menubar)))) + (let ((type (framep (or frame (selected-frame))))) + (cond + ((eq type 'x) (x-menu-bar-open frame)) + ((eq type 'w32) (w32-menu-bar-open frame)) + (t (with-selected-frame (or frame (selected-frame)) + (tmm-menubar)))))) (global-set-key [f10] 'menu-bar-open) diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index f6f3b53e4b2..d7e0c580c5a 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -385,16 +385,21 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") ;;; make f10 activate the real menubar rather than the mini-buffer menu ;;; navigation feature. - (defun menu-bar-open (&optional frame) + (defun w32-menu-bar-open (&optional frame) "Start key navigation of the menu bar in FRAME. - This initially activates the first menu-bar item, and you can then navigate - with the arrow keys, select a menu entry with the Return key or cancel with - the Escape key. If FRAME has no menu bar, this function does nothing. +This initially activates the first menu-bar item, and you can then navigate +with the arrow keys, select a menu entry with the Return key or cancel with +the Escape key. If FRAME has no menu bar, this function does nothing. - If FRAME is nil or not given, use the selected frame." +If FRAME is nil or not given, use the selected frame. +If FRAME does not have the menu bar enabled, display a text menu using +`tmm-menubar'." (interactive "i") - (w32-send-sys-command ?\xf100 frame)) + (if menu-bar-mode + (w32-send-sys-command ?\xf100 frame) + (with-selected-frame (or frame (selected-frame)) + (tmm-menubar)))) ;; W32 systems have different fonts than commonly found on X, so |