aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2008-06-11 00:25:24 +0000
committerJason Rumney2008-06-11 00:25:24 +0000
commit14f3467e1fcceaf23f71f69a8b99a41a05827956 (patch)
tree647c0b3c5c7cdcd55fc95074ee307ad660dd23da
parenta83983874d7c6aaeba299c7ed03c132a0a5b4794 (diff)
downloademacs-14f3467e1fcceaf23f71f69a8b99a41a05827956.tar.gz
emacs-14f3467e1fcceaf23f71f69a8b99a41a05827956.zip
* 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/ChangeLog8
-rw-r--r--lisp/menu-bar.el13
-rw-r--r--lisp/term/w32-win.el17
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 @@
12008-06-11 Jason Rumney <jasonr@gnu.org>
2
3 * term/w32-win.el (w32-menu-bar-open): Rename from menu-bar-open.
4 Use tmm-menubar if menu is disabled in this frame.
5
6 * menu-bar.el (menu-bar-open): Determine how to open menu bar
7 from frame type, per documentation. Add w32 case.
8
12008-06-10 Stefan Monnier <monnier@iro.umontreal.ca> 92008-06-10 Stefan Monnier <monnier@iro.umontreal.ca>
2 10
3 * minibuffer.el (completion--merge-suffix): New function. 11 * 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."
1903 1903
1904This function decides which method to use to access the menu 1904This function decides which method to use to access the menu
1905depending on FRAME's terminal device. On X displays, it calls 1905depending on FRAME's terminal device. On X displays, it calls
1906`x-menu-bar-open'; otherwise it calls `tmm-menubar'. 1906`x-menu-bar-open'; on Windows, `w32-menu-bar-open' otherwise it
1907calls `tmm-menubar'.
1907 1908
1908If FRAME is nil or not given, use the selected frame." 1909If FRAME is nil or not given, use the selected frame."
1909 (interactive) 1910 (interactive)
1910 (if (eq window-system 'x) 1911 (let ((type (framep (or frame (selected-frame)))))
1911 (x-menu-bar-open frame) 1912 (cond
1912 (with-selected-frame (or frame (selected-frame)) 1913 ((eq type 'x) (x-menu-bar-open frame))
1913 (tmm-menubar)))) 1914 ((eq type 'w32) (w32-menu-bar-open frame))
1915 (t (with-selected-frame (or frame (selected-frame))
1916 (tmm-menubar))))))
1914 1917
1915(global-set-key [f10] 'menu-bar-open) 1918(global-set-key [f10] 'menu-bar-open)
1916 1919
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")
385 385
386 ;;; make f10 activate the real menubar rather than the mini-buffer menu 386 ;;; make f10 activate the real menubar rather than the mini-buffer menu
387 ;;; navigation feature. 387 ;;; navigation feature.
388 (defun menu-bar-open (&optional frame) 388 (defun w32-menu-bar-open (&optional frame)
389 "Start key navigation of the menu bar in FRAME. 389 "Start key navigation of the menu bar in FRAME.
390 390
391 This initially activates the first menu-bar item, and you can then navigate 391This initially activates the first menu-bar item, and you can then navigate
392 with the arrow keys, select a menu entry with the Return key or cancel with 392with the arrow keys, select a menu entry with the Return key or cancel with
393 the Escape key. If FRAME has no menu bar, this function does nothing. 393the Escape key. If FRAME has no menu bar, this function does nothing.
394 394
395 If FRAME is nil or not given, use the selected frame." 395If FRAME is nil or not given, use the selected frame.
396If FRAME does not have the menu bar enabled, display a text menu using
397`tmm-menubar'."
396 (interactive "i") 398 (interactive "i")
397 (w32-send-sys-command ?\xf100 frame)) 399 (if menu-bar-mode
400 (w32-send-sys-command ?\xf100 frame)
401 (with-selected-frame (or frame (selected-frame))
402 (tmm-menubar))))
398 403
399 404
400;; W32 systems have different fonts than commonly found on X, so 405;; W32 systems have different fonts than commonly found on X, so