I'm trying to create a dynamic menu for my own compiling plugin, but I have hit a wall. This is the code that I have at the moment:
(defun mme-tools-create-menu ()
(easy-menu-define mme-tools-menu erlang-mode-map "MME-Tools-Menu"
'("MME-Tools"
("Current Subsystem"
["Run gmake" mme-tools-build]
["Build beams" mme-tools-build-beam]
["Run Posttest" mme-tools-build-posttest]
["Run Move" mme-tools-build-move])
("Build Subsystem")))
(dolist (path mmepaths)
(if (string-match "code" path)
(let* ((ss (file-name-base path))
(uss (upcase ss)))
(easy-menu-add-item mme-tools-menu '("Build Subsystem")
[uss (mme-tools-build-path-subsystem " -j10 beam" (getenv ss))])))))
What I want the code to do is to make a sub-menu called "Build Subsystem" and fill it with entries. But no entries are created. Any help would be appreciated.
I'd suggest you do something like