help-gnu-emacs
[Top][All Lists]
Advanced

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

Creating a sub-menu to "C++"-menu


From: Nordlöw
Subject: Creating a sub-menu to "C++"-menu
Date: Tue, 16 Sep 2008 04:51:43 -0700 (PDT)
User-agent: G2/1.0

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


reply via email to

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