[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Modify menu-bar help

From: Drew Adams
Subject: RE: Modify menu-bar help
Date: Thu, 24 Feb 2011 16:52:30 -0800

(defun tx-greet ()
  (message "Hello Tim!"))

(defun tx-menu ()
  (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]