# HG changeset patch # User Jason Rumney # Date 1213143924 0 # Node ID ea2762d2d8476a385ddd8ca6ce50b977994d841c # Parent a774d9d92dbe6ba167d5c0b39ec80547cea6b181 * 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. diff -r a774d9d92dbe -r ea2762d2d847 lisp/ChangeLog --- a/lisp/ChangeLog Tue Jun 10 23:33:11 2008 +0000 +++ b/lisp/ChangeLog Wed Jun 11 00:25:24 2008 +0000 @@ -1,3 +1,11 @@ +2008-06-11 Jason Rumney + + * 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 * minibuffer.el (completion--merge-suffix): New function. diff -r a774d9d92dbe -r ea2762d2d847 lisp/menu-bar.el --- a/lisp/menu-bar.el Tue Jun 10 23:33:11 2008 +0000 +++ b/lisp/menu-bar.el Wed Jun 11 00:25:24 2008 +0000 @@ -1903,14 +1903,17 @@ 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 -r a774d9d92dbe -r ea2762d2d847 lisp/term/w32-win.el --- a/lisp/term/w32-win.el Tue Jun 10 23:33:11 2008 +0000 +++ b/lisp/term/w32-win.el Wed Jun 11 00:25:24 2008 +0000 @@ -385,16 +385,21 @@ ;;; 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