From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?=D3scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: [PATCH] `menu-bar-open' support for Windows console. Date: Tue, 10 Jun 2008 03:53:16 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1213062820 4566 80.91.229.12 (10 Jun 2008 01:53:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Jun 2008 01:53:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 10 03:54:23 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K5t42-00043Y-5n for ged-emacs-devel@m.gmane.org; Tue, 10 Jun 2008 03:54:22 +0200 Original-Received: from localhost ([127.0.0.1]:59252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5t3E-0004Qy-WF for ged-emacs-devel@m.gmane.org; Mon, 09 Jun 2008 21:53:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K5t3B-0004Q8-0g for emacs-devel@gnu.org; Mon, 09 Jun 2008 21:53:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K5t3A-0004Pm-DO for emacs-devel@gnu.org; Mon, 09 Jun 2008 21:53:28 -0400 Original-Received: from [199.232.76.173] (port=35210 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5t3A-0004Pi-8i for emacs-devel@gnu.org; Mon, 09 Jun 2008 21:53:28 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:47975 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K5t39-00032B-QX for emacs-devel@gnu.org; Mon, 09 Jun 2008 21:53:28 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K5t36-0006M5-RD for emacs-devel@gnu.org; Tue, 10 Jun 2008 01:53:24 +0000 Original-Received: from 179.red-83-32-115.dynamicip.rima-tde.net ([83.32.115.179]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jun 2008 01:53:24 +0000 Original-Received: from ofv by 179.red-83-32-115.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jun 2008 01:53:24 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 179.red-83-32-115.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt) Cancel-Lock: sha1:+eIRVBdIi5gL+HkWMr+J3dfSdH4= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:98838 Archived-At: 2008-06-10 Oscar Fuentes * term/w32-win.el (menu-bar-open): Call tmm-menubar when on a console or when menu-bar-mode is nil. Index: term/w32-win.el =================================================================== RCS file: /sources/emacs/emacs/lisp/term/w32-win.el,v retrieving revision 1.99 diff -u -r1.99 w32-win.el --- term/w32-win.el 10 May 2008 17:34:32 -0000 1.99 +++ term/w32-win.el 10 Jun 2008 01:25:06 -0000 @@ -383,8 +383,6 @@ ;;;; Function keys - ;;; make f10 activate the real menubar rather than the mini-buffer menu - ;;; navigation feature. (defun menu-bar-open (&optional frame) "Start key navigation of the menu bar in FRAME. @@ -392,9 +390,13 @@ 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 `window-system' or `menu-bar-mode' are nil, call `tmm-menubar'." (interactive "i") - (w32-send-sys-command ?\xf100 frame)) + (if (and window-system menu-bar-mode) + (w32-send-sys-command ?\xf100 frame) + (tmm-menubar))) ;; W32 systems have different fonts than commonly found on X, so