From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Modify menu-bar help Date: Thu, 24 Feb 2011 16:52:30 -0800 Message-ID: <22CD3A4D8F6B4B5A8F20A4FBE74BAD10@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00FC_01CBD443.3A1E1B20" X-Trace: dough.gmane.org 1298595188 2618 80.91.229.12 (25 Feb 2011 00:53:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Feb 2011 00:53:08 +0000 (UTC) To: "'Tim Cross'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 25 01:53:03 2011 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.69) (envelope-from ) id 1Pslva-00017L-RZ for ged-emacs-devel@m.gmane.org; Fri, 25 Feb 2011 01:53:03 +0100 Original-Received: from localhost ([127.0.0.1]:43174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pslva-0002RI-G5 for ged-emacs-devel@m.gmane.org; Thu, 24 Feb 2011 19:53:02 -0500 Original-Received: from [140.186.70.92] (port=46997 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PslvU-0002PW-Ry for emacs-devel@gnu.org; Thu, 24 Feb 2011 19:52:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PslvT-0006MZ-4m for emacs-devel@gnu.org; Thu, 24 Feb 2011 19:52:56 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:53310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PslvS-0006Lz-VY for emacs-devel@gnu.org; Thu, 24 Feb 2011 19:52:55 -0500 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p1P0qmpR004060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 25 Feb 2011 00:52:49 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p1P0qlBK023136; Fri, 25 Feb 2011 00:52:47 GMT Original-Received: from abhmt012.oracle.com by acsmt354.oracle.com with ESMTP id 1036175501298595143; Thu, 24 Feb 2011 16:52:23 -0800 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 24 Feb 2011 16:52:23 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcvUeOtbfMj+ldYpQyiocVn1KKRSewACoN7g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090208.4D66FD60.0110:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 148.87.113.121 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:136461 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_00FC_01CBD443.3A1E1B20 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit (defun tx-greet () (interactive) (message "Hello Tim!")) (defun tx-menu () (interactive) (define-key lisp-interaction-mode-map [menu-bar tx] '(menu-item "TX Test" tx-greet))) I get the expected menu item at the top level, but clicking on it does nothing - well, it grabs focus, the item is highlighted and you have to click again to release focus. So, what am I doing wrong? Doing just what you said works for me. I get a `TX Test' menu at the top level. Clicking it shows the message `Hello Tim!'. I used a recent Windows build of Emacs 24 (emacs -Q). Did you test with `emacs -Q'? Did you remember to do `M-x t-menu'? ;-) Did you look in *Messages* for the message (in case it was too quick). Did you already have a *scratch* buffer (or other buffer in Lisp Interaction Mode). If so, try killing it and revisiting (recreating) it. (But if you see the menu `TX Test' then it should be OK.) You can also try running the functions on `menu-bar-update-hook'. Or (run-hooks 'activate-menubar-hook 'menu-bar-update-hook). But again if you see `TX Test' then it should be OK. (IOW, I don't know what's wrong, sorry.) HTH - Drew ------=_NextPart_000_00FC_01CBD443.3A1E1B20 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
(defun tx-greet=20 ()
  (interactive) 
  (message "Hello Tim!"))

(defun tx-menu ()
  (interactive)
  (define-key lisp-interaction-mode-map [menu-bar = tx]
    '(menu-item "TX Test" tx-greet)))

I get the expected menu item at the top level, but clicking on it = does=20 nothing - well, it grabs focus, the item is highlighted and you have = to click=20 again to release focus. 

So, what am I doing wrong?
Doing just what you said works for me.  = I get a=20 `TX Test' menu at the top level. Clicking it shows the message `Hello = Tim!'. I=20 used a recent Windows build of Emacs 24 (emacs -Q).
 
Did you test with `emacs = -Q'?
Did you remember to do `M-x t-menu'?=20 ;-)
Did you look in *Messages* for the message = (in case it=20 was too quick).
 
Did you already have a *scratch* buffer (or = other=20 buffer in Lisp Interaction Mode).
If so, try killing it and revisiting=20 (recreating) it.
(But if you see the menu `TX Test' then it = should be=20 OK.)
 
You can also try running the functions on=20 `menu-bar-update-hook'.
Or (run-hooks 'activate-menubar-hook=20 'menu-bar-update-hook).
But again if you see `TX Test' then it should = be=20 OK.
(IOW, I don't know what's wrong,=20 sorry.)
 
HTH -=20 Drew

 
------=_NextPart_000_00FC_01CBD443.3A1E1B20--