unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Creating a sub-menu to "C++"-menu
@ 2008-09-16 11:51 Nordlöw
  2008-09-16 14:26 ` Nordlöw
  0 siblings, 1 reply; 2+ messages in thread
From: Nordlöw @ 2008-09-16 11:51 UTC (permalink / raw)
  To: help-gnu-emacs

I am trying to create sub-menu to the menu-bar item "C++" (c-c++-
menu). Here is my try:

(defvar c++-iostream-objects-menu-list
  '("IOstream Objects (prefixed by std::)"
    ["cin" '(lambda () (insert "std::cin")) [:active t :help "Standard
input stream."]]
    ))
(add-hook 'c++-mode-hook '(lambda ()
                            (easy-menu-define c++-iostream-objects-
menu c-c++-menu
                              "C++ IOstream Objects" c++-iostream-
objects-menu-list)))

However, nothing happens when I enter c++-mode. What have I done
wrong?

Thank in advance,
Nordlöw


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-16 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16 11:51 Creating a sub-menu to "C++"-menu Nordlöw
2008-09-16 14:26 ` Nordlöw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).