0

I am using easy-menu but cannot get the submenu to work

(defvar mcp-outl-subm
  '("Outl"
      ["Hide Direct Body" outline-hide-entry
         :help "Hide Entry"]
      ["Expose Direct Body" outline-show-entry
         :help "Show Entry"]
      ["Expose Headings" outline-hide-body
         :help "Hide Body"])
  "Sub-Menu for outline tools.")

  (easy-menu-define emenu global-map "Emenu"
    '("Emenu"
        ["Outl"  mcp-outl-subm  t]))

Checked out the backquote thing without solving the problem

  (easy-menu-define emenu global-map "Emenu"
    `("Emenu"
        ["Outl"  ,mcp-outl-subm  t]))
Dilna
  • 1,173
  • 3
  • 10
  • You can answer this question yourself after reading https://www.gnu.org/software/emacs/manual/html_node/elisp/Backquote.html , you don't need us for this. I promise the manual will tell you *exactly* what you need, *with examples*. When you have made the simple change you need (two characters), you can post your own answer and mark it as accepted :) – Trevoke Jul 15 '23 at 23:11
  • I checked it out but did not work. Which functions in the list should I evaluate, this one `,mcp-outl-subm`. – Dilna Jul 15 '23 at 23:27
  • 1
    What did not work? Please share an example. It is very hard to help you if you do not show us the path you are following. – Trevoke Jul 15 '23 at 23:35

1 Answers1

1

Try:

  (easy-menu-define emenu global-map "Emenu"
    `("Emenu"
       ,mcp-outl-subm))
NickD
  • 27,023
  • 3
  • 23
  • 42