home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epmmac.zip / STDMENU.E < prev    next >
Text File  |  1996-01-25  |  49KB  |  761 lines

  1. compile if not defined(CORE_stuff)
  2. ; This determines whether the CORE-specific commands (DEFINE)
  3. ; are included in the menus.
  4.    const CORE_STUFF=0
  5. compile endif
  6.  
  7. /*
  8. ┌─────────────────────────────────────────────────────────────────────────────┐
  9. │What's it called  : loaddefaultmenu                                          │
  10. │                                                                             │
  11. │What does it do   : used by stdcnf.e to setup default EPM action bar         │
  12. │                    (Note: a menu id of 0 halts the interpreter when         │
  13. │                     selected.)                                              │
  14. │                                                                             │
  15. │Who and When      : Jerry C.     2/25/89                                     │
  16. └─────────────────────────────────────────────────────────────────────────────┘
  17. */
  18.  
  19. defc loaddefaultmenu
  20.    universal activemenu,defaultmenu
  21.  
  22.    parse arg menuname .
  23.    if menuname = '' then                  -- Initialization call
  24.       menuname = 'default'
  25.       defaultmenu = menuname              -- default menu name
  26.       activemenu  = defaultmenu
  27.    endif
  28.  
  29. compile if EPATH='LAMPATH'  -- LaMail sets up a mail menu first.
  30. defc loaddefaultmenu2
  31.    universal activemenu,defaultmenu
  32.    menuname = defaultmenu
  33. compile endif
  34.    call add_file_menu(menuname)
  35.    call add_edit_menu(menuname)
  36.    call add_search_menu(menuname)
  37.    call add_options_menu(menuname)
  38. compile if MENU_LIMIT
  39.    call add_ring_menu(menuname)
  40. compile endif
  41.    call add_command_menu(menuname)
  42. compile if EPATH<>'LAMPATH'  -- LaMail puts a VM menu here, then adds help.
  43.    call add_help_menu(menuname)
  44. compile endif
  45. compile if EVERSION = 5.60 -- Until next 5.60 update, anyway...
  46.    buildsubmenu  'SYSMENU', 81, '', '', 0 , 0
  47.      buildmenuitem 'SYSMENU', 81, 8100, \0,               '',                 4, 0
  48.      buildmenuitem 'SYSMENU', 81, 8101, CONFIG_MENU__MSG, 'configdlg SYS'CONFIG_MENUP__MSG,  0, mpfrom2short(HP_OPTIONS_CONFIG, 0)
  49.    showmenu 'SYSMENU',2
  50. compile endif
  51.  
  52. defproc add_file_menu(menuname)
  53. compile if RING_OPTIONAL
  54.    universal ring_enabled
  55. compile endif
  56.    buildsubmenu menuname, 2, FILE_BAR__MSG, FILE_BARP__MSG, 0 , mpfrom2short(HP_FILE, 0)
  57.      buildmenuitem menuname, 2, 198, NEW_MENU__MSG,            'NEW'NEW_MENUP__MSG,     0, mpfrom2short(HP_FILE_NEW, 0)
  58.      buildmenuitem menuname, 2, 199, OPEN_NEW_MENU__MSG,       'OPEN'OPEN_NEW_MENUP__MSG,     0, mpfrom2short(HP_FILE_OPEN_NEW, 0)
  59.      buildmenuitem menuname, 2, 200, OPEN_MENU__MSG\9 || CTRL_KEY__MSG'+O', 'OPENDLG'OPEN_MENUP__MSG,          0, mpfrom2short(HP_FILE_OPEN, 0)
  60.      buildmenuitem menuname, 2, 201, GET_MENU__MSG,            'OPENDLG GET'GET_MENUP__MSG,      0, mpfrom2short(HP_FILE_GET , 0)
  61. compile if RING_OPTIONAL
  62.    if ring_enabled then
  63. compile endif
  64.      buildmenuitem menuname, 2, 202, ADD_MENU__MSG\9'F8', 'OPENDLG EDIT'ADD_MENUP__MSG,     0, mpfrom2short(HP_FILE_EDIT, 0)
  65. compile if RING_OPTIONAL
  66.    endif
  67. compile endif
  68.      buildmenuitem menuname, 2, 203, \0,                          '',                 4, 0
  69.      buildmenuitem menuname, 2, 204, RENAME_MENU__MSG\9'F7',   'rename'RENAME_MENUP__MSG,0, mpfrom2short(HP_FILE_NAME, 0)
  70.      buildmenuitem menuname, 2, 205, \0,                          '',                 4, 0
  71.      buildmenuitem menuname, 2, 206, SAVE_MENU__MSG\9'F2',     'SAVE'SAVE_MENUP__MSG,             0, mpfrom2short(HP_FILE_SAVE, 0)
  72. compile if EVERSION >= '5.21'
  73.      buildmenuitem menuname, 2, 208, SAVEAS_MENU__MSG,         'SAVEAS_DLG'SAVEAS_MENUP__MSG, 0, mpfrom2short(HP_FILE_SAVEAS, 0)
  74. compile endif
  75. compile if RING_OPTIONAL
  76.    if ring_enabled then
  77. compile endif         -- Note:  207 used in LaMail; keep ID the same.
  78.      buildmenuitem menuname, 2, 207, FILE_MENU__MSG\9'F4',     'FILE'FILE_MENUP__MSG,             0, mpfrom2short(HP_FILE_FILE, 0)
  79. compile if RING_OPTIONAL
  80.    else
  81.      buildmenuitem menuname, 2, 207, SAVECLOSE_MENU__MSG\9'F4',     'FILE'FILE_MENUP__MSG,        0, mpfrom2short(HP_FILE_FILE, 0)
  82.    endif
  83. compile endif
  84.      buildmenuitem menuname, 2, 209, QUIT_MENU__MSG\9'F3',     'QUIT'QUIT_MENUP__MSG,             0, mpfrom2short(HP_FILE_QUIT, 0)
  85.      buildmenuitem menuname, 2, 210, \0,                           '',                 4, 0
  86. compile if ENHANCED_PRINT_SUPPORT
  87.      buildmenuitem menuname, 2, 211, PRT_FILE_MENU__MSG'...',  'printdlg'ENHPRT_FILE_MENUP__MSG,         0, mpfrom2short(HP_FILE_ENHPRINT, 0)
  88. compile elseif EVERSION < '5.51'
  89.      buildmenuitem menuname, 2, 211, PRT_FILE_MENU__MSG,       'xcom save' default_printer()PRT_FILE_MENUP__MSG,   0, mpfrom2short(HP_FILE_PRINT, 0)
  90. compile else
  91.      buildmenuitem menuname, 2, 211, PRT_FILE_MENU__MSG,       'xcom save /s /ne' default_printer()PRT_FILE_MENUP__MSG,   0, mpfrom2short(HP_FILE_PRINT, 0)
  92. compile endif
  93.    return
  94.  
  95. define
  96.  compile if not defined(ALTERNATE_PASTE)
  97.   compile if DEFAULT_PASTE = ''
  98.    ALTERNATE_PASTE = 'C'
  99.   compile else
  100.    ALTERNATE_PASTE = ''
  101.   compile endif
  102.  compile endif
  103.    PASTE_C_KEY = ''
  104.    PASTE_B_KEY = ''
  105.    PASTE_L_KEY = ''
  106. compile if ALTERNATE_PASTE = ''
  107.    PASTE_L_KEY = \9 || CTRL_KEY__MSG'+'SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  108. compile elseif ALTERNATE_PASTE = 'B'
  109.    PASTE_B_KEY = \9 || CTRL_KEY__MSG'+'SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  110. compile elseif ALTERNATE_PASTE = 'C'
  111.    PASTE_C_KEY = \9 || CTRL_KEY__MSG'+'SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  112. compile else
  113.    * Error:  ALTERNATE_PASTE must be '', 'B', or 'C'
  114. compile endif
  115. compile if DEFAULT_PASTE = ''
  116.    PASTE_L_KEY = \9 || SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  117. compile elseif DEFAULT_PASTE = 'B'
  118.    PASTE_B_KEY = \9 || SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  119. compile elseif DEFAULT_PASTE = 'C'
  120.    PASTE_C_KEY = \9 || SHIFT_KEY__MSG'+'INSERT_KEY__MSG
  121. compile else
  122.    * Error:  DEFAULT_PASTE must be '', 'B', or 'C'
  123. compile endif
  124.  
  125. compile if not defined(MAIL_ACCEL__L)  -- LaMail not NLS-translated.
  126.   const MAIL_ACCEL__L = 'M'
  127.         MAIL_ACCEL__A1 =  77
  128.         MAIL_ACCEL__A2 = 109
  129. compile endif
  130. define  -- Prepare for some conditional tests
  131. compile if EPATH = 'LAMPATH'  -- If LaMail, "Mail" will be on action bar
  132.    maybe_mail_accel = 'MAIL_ACCEL__L <>'
  133. compile else                  -- otherwise, it won't
  134.    maybe_mail_accel = "' ' <"    -- Will be true for any letter
  135. compile endif
  136. compile if MENU_LIMIT
  137.    maybe_ring_accel = 'RING_ACCEL__L <>'
  138. compile else
  139.    maybe_ring_accel = "' ' <"  -- Will be true for any letter
  140. compile endif
  141. compile if defined(ACTIONS_ACCEL__L)  -- For CUSTEPM support
  142.    maybe_actions_accel = 'ACTIONS_ACCEL__L <>'
  143. compile else
  144.    maybe_actions_accel = "' ' <"  -- Will be true for any letter
  145. compile endif
  146.  
  147. defproc add_edit_menu(menuname)
  148.  compile if WANT_STACK_CMDS = 'SWITCH'
  149.    universal stack_cmds
  150.  compile endif
  151.  compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  152.    universal CUA_MENU_ACCEL
  153.  compile endif
  154.  
  155. compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  156.    accel_len = (3+length(ALT_KEY__MSG))*(not CUA_MENU_ACCEL)
  157. compile endif
  158.  
  159.    buildsubmenu  menuname, 8, EDIT_BAR__MSG, ''EDIT_BARP__MSG, 0 , mpfrom2short(HP_EDIT, 0)
  160.      buildmenuitem menuname, 8, 816, UNDO_MENU__MSG\9 || ALT_KEY__MSG'+'BACKSPACE_KEY__MSG,   'UNDO 1'UNDO_MENUP__MSG,    0, mpfrom2short(HP_EDIT_UNDO, 0)
  161.      buildmenuitem menuname, 8, 818, UNDO_REDO_MENU__MSG\9 || CTRL_KEY__MSG'+U', 'undodlg'UNDO_REDO_MENUP__MSG,      0, mpfrom2short(HP_EDIT_UNDOREDO, 0)
  162. compile if WANT_DM_BUFFER
  163.      buildmenuitem menuname, 8, 817, RECOVER_MARK_MENU__MSG,        'GetDMBuff'RECOVER_MARK_MENUP__MSG,    0, mpfrom2short(HP_EDIT_RECOVER, 0)
  164. compile endif  -- WANT_DM_BUFFER
  165.      buildmenuitem menuname, 8, 807, \0,                               '',          4, 0
  166.      buildmenuitem menuname, 8, 808, CLIP_COPY_MENU__MSG\9 || CTRL_KEY__MSG'+'INSERT_KEY__MSG ,  'Copy2Clip'CLIP_COPY_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPY, 0)
  167.      buildmenuitem menuname, 8, 809, CUT_MENU__MSG\9 || SHIFT_KEY__MSG'+'DELETE_KEY__MSG, 'Cut'CUT_MENUP__MSG,       0, mpfrom2short(HP_EDIT_CUT, 0)
  168.      buildmenuitem menuname, 8, 810, PASTE_C_MENU__MSG||PASTE_C_KEY,   'Paste C'PASTE_C_MENUP__MSG,   0, mpfrom2short(HP_EDIT_PASTEC, 0)
  169.      buildmenuitem menuname, 8, 811, PASTE_L_MENU__MSG||PASTE_L_KEY,   'Paste'PASTE_L_MENUP__MSG,     0, mpfrom2short(HP_EDIT_PASTE, 0)
  170.      buildmenuitem menuname, 8, 812, PASTE_B_MENU__MSG||PASTE_B_KEY,   'Paste B'PASTE_B_MENUP__MSG,   0, mpfrom2short(HP_EDIT_PASTEB, 0)
  171. compile if EVERSION >= 5.50  -- In 5.50, we have a STYLE attribute
  172.      buildmenuitem menuname, 8, 826, \0,                               '',          4, 0
  173.      buildmenuitem menuname, 8, 827, STYLE_MENU__MSG\9 || CTRL_KEY__MSG'+Y',        'fontlist'STYLE_MENUP__MSG,    0, mpfrom2short(HP_OPTIONS_STYLE, 0)
  174. compile endif
  175.      buildmenuitem menuname, 8, 815, \0,                               '',          4, 0
  176.  
  177. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'C' & EDIT_ACCEL__L<>'C' & SEARCH_ACCEL__L<>'C' & OPTIONS_ACCEL__L<>'C' & COMMAND_ACCEL__L<>'C' & HELP_ACCEL__L<>'C' & $maybe_mail_accel 'C' & $maybe_ring_accel 'C' & $maybe_actions_accel 'C')
  178.      buildmenuitem menuname, 8, 800, COPY_MARK_MENU__MSG\9 || ALT_KEY__MSG'+C',     'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
  179. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  180.      buildmenuitem menuname, 8, 800, COPY_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+C', accel_len),     'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
  181. compile else
  182.      buildmenuitem menuname, 8, 800, COPY_MARK_MENU__MSG,              'DUPMARK C'COPY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_COPYMARK, 0)
  183. compile endif
  184. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'M' & EDIT_ACCEL__L<>'M' & SEARCH_ACCEL__L<>'M' & OPTIONS_ACCEL__L<>'M' & COMMAND_ACCEL__L<>'M' & HELP_ACCEL__L<>'M' & $maybe_mail_accel 'M' & $maybe_ring_accel 'M' & $maybe_actions_accel 'M')
  185.      buildmenuitem menuname, 8, 801, MOVE_MARK_MENU__MSG\9 || ALT_KEY__MSG'+M',     'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
  186. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  187.      buildmenuitem menuname, 8, 801, MOVE_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+M', accel_len),     'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
  188. compile else
  189.      buildmenuitem menuname, 8, 801, MOVE_MARK_MENU__MSG,     'DUPMARK M'MOVE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_MOVE, 0)
  190. compile endif
  191. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'O' & EDIT_ACCEL__L<>'O' & SEARCH_ACCEL__L<>'O' & OPTIONS_ACCEL__L<>'O' & COMMAND_ACCEL__L<>'O' & HELP_ACCEL__L<>'O' & $maybe_mail_accel 'O' & $maybe_ring_accel 'O' & $maybe_actions_accel 'O')
  192.      buildmenuitem menuname, 8, 802, OVERLAY_MARK_MENU__MSG\9 || ALT_KEY__MSG'+O',  'DUPMARK O'OVERLAY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_OVERLAY, 0)
  193. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  194.      buildmenuitem menuname, 8, 802, OVERLAY_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+O', accel_len),  'DUPMARK O'OVERLAY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_OVERLAY, 0)
  195. compile else
  196.      buildmenuitem menuname, 8, 802, OVERLAY_MARK_MENU__MSG,  'DUPMARK O'OVERLAY_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_OVERLAY, 0)
  197. compile endif
  198. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'A' & EDIT_ACCEL__L<>'A' & SEARCH_ACCEL__L<>'A' & OPTIONS_ACCEL__L<>'A' & COMMAND_ACCEL__L<>'A' & HELP_ACCEL__L<>'A' & $maybe_mail_accel 'A' & $maybe_ring_accel 'A' & $maybe_actions_accel 'A')
  199.      buildmenuitem menuname, 8, 803, ADJUST_MARK_MENU__MSG\9 || ALT_KEY__MSG'+A',   'DUPMARK A'ADJUST_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_ADJUST, 0)
  200. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  201.      buildmenuitem menuname, 8, 803, ADJUST_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+A', accel_len),   'DUPMARK A'ADJUST_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_ADJUST, 0)
  202. compile else
  203.      buildmenuitem menuname, 8, 803, ADJUST_MARK_MENU__MSG,   'DUPMARK A'ADJUST_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_ADJUST, 0)
  204. compile endif
  205.      buildmenuitem menuname, 8, 804, \0,                       '',          4, 0
  206.      buildmenuitem menuname, 8, 828, SELECT_ALL_MENU__MSG\9 || CTRL_KEY__MSG'+/',     'select_all'SELECT_ALL_MENUP__MSG, 0, mpfrom2short(HP_EDIT_SELECTALL, 0)
  207. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'U' & EDIT_ACCEL__L<>'U' & SEARCH_ACCEL__L<>'U' & OPTIONS_ACCEL__L<>'U' & COMMAND_ACCEL__L<>'U' & HELP_ACCEL__L<>'U' & $maybe_mail_accel 'U' & $maybe_ring_accel 'U' & $maybe_actions_accel 'U')
  208.      buildmenuitem menuname, 8, 805, UNMARK_MARK_MENU__MSG\9 || ALT_KEY__MSG'+U',   'DUPMARK U'UNMARK_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNMARK, 0)
  209. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  210.      buildmenuitem menuname, 8, 805, UNMARK_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+U', accel_len),   'DUPMARK U'UNMARK_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNMARK, 0)
  211. compile else
  212.      buildmenuitem menuname, 8, 805, UNMARK_MARK_MENU__MSG,   'DUPMARK U'UNMARK_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_UNMARK, 0)
  213. compile endif
  214. compile if BLOCK_ACTIONBAR_ACCELERATORS=1 | (FILE_ACCEL__L<>'D' & EDIT_ACCEL__L<>'D' & SEARCH_ACCEL__L<>'D' & OPTIONS_ACCEL__L<>'D' & COMMAND_ACCEL__L<>'D' & HELP_ACCEL__L<>'D' & $maybe_mail_accel 'D' & $maybe_ring_accel 'D' & $maybe_actions_accel 'D')
  215.      buildmenuitem menuname, 8, 806, DELETE_MARK_MENU__MSG\9 || ALT_KEY__MSG'+D',   'DUPMARK D'DELETE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_DELETE, 0)
  216. compile elseif BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  217.      buildmenuitem menuname, 8, 806, DELETE_MARK_MENU__MSG||leftstr(\9 || ALT_KEY__MSG'+D', accel_len),   'DUPMARK D'DELETE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_DELETE, 0)
  218. compile else
  219.      buildmenuitem menuname, 8, 806, DELETE_MARK_MENU__MSG,   'DUPMARK D'DELETE_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_DELETE, 0)
  220. compile endif
  221.  
  222. compile if WANT_STACK_CMDS
  223.  compile if WANT_STACK_CMDS = 'SWITCH'
  224.    if stack_cmds then
  225.  compile endif
  226.      buildmenuitem menuname, 8, 819, \0,                               '',          4, 0
  227.      buildmenuitem menuname, 8, 820, PUSH_MARK_MENU__MSG\9 || CTRL_KEY__MSG'+'SHIFT_KEY__MSG'+'DOWN_KEY__MSG, 'PUSHMARK'PUSH_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PUSHMARK, 0)
  228.      buildmenuitem menuname, 8, 821, POP_MARK_MENU__MSG\9 || CTRL_KEY__MSG'+'SHIFT_KEY__MSG'+'UP_KEY__MSG, 'POPMARK'POP_MARK_MENUP__MSG,  0, mpfrom2short(HP_EDIT_POPMARK, 16384)
  229.      buildmenuitem menuname, 8, 822, SWAP_MARK_MENU__MSG\9 || CTRL_KEY__MSG'+'SHIFT_KEY__MSG'+=', 'SWAPMARK'SWAP_MARK_MENUP__MSG,  0, mpfrom2short(HP_EDIT_SWAPMARK, 16384)
  230.      buildmenuitem menuname, 8, 823, PUSH_CURSOR_MENU__MSG\9 || CTRL_KEY__MSG'+'DOWN_KEY__MSG, 'PUSHPOS'PUSH_CURSOR_MENUP__MSG,  0, mpfrom2short(HP_EDIT_PUSHPOS, 0)
  231.      buildmenuitem menuname, 8, 824, POP_CURSOR_MENU__MSG\9 || CTRL_KEY__MSG'+'UP_KEY__MSG, 'POPPOS'POP_CURSOR_MENUP__MSG,   0, mpfrom2short(HP_EDIT_POPPOS, 16384)
  232.      buildmenuitem menuname, 8, 825, SWAP_CURSOR_MENU__MSG\9 || CTRL_KEY__MSG'+=', 'SWAPPOS'SWAP_CURSOR_MENUP__MSG,   0, mpfrom2short(HP_EDIT_SWAPPOS, 16384)
  233.  compile if WANT_STACK_CMDS = 'SWITCH'
  234.    endif
  235.  compile endif
  236. compile endif
  237.      buildmenuitem menuname, 8, 813, \0,                               '',          4, 0
  238. compile if ENHANCED_PRINT_SUPPORT
  239.      buildmenuitem menuname, 8, 814, PRT_MARK_MENU__MSG'...',          'PRINTDLG M'ENHPRT_MARK_MENUP__MSG,0, mpfrom2short(HP_EDIT_ENHPRINT, 0)
  240. compile else
  241.      buildmenuitem menuname, 8, 814, PRT_MARK_MENU__MSG,               'DUPMARK P'PRT_MARK_MENUP__MSG, 0, mpfrom2short(HP_EDIT_PRINT, 0)
  242. compile endif
  243.    return
  244.  
  245. defproc add_search_menu(menuname)
  246.    buildsubmenu menuname, 3, SEARCH_BAR__MSG, ''SEARCH_BARP__MSG, 0 , mpfrom2short(HP_SEARCH, 0)
  247.      buildmenuitem menuname, 3, 300, SEARCH_MENU__MSG\9 || CTRL_KEY__MSG'+S',      'SEARCHDLG'SEARCH_MENUP__MSG,   0, mpfrom2short(HP_SEARCH_SEARCH, 0)
  248.      buildmenuitem menuname, 3, 301, \0,                           '',            4, 0
  249.      buildmenuitem menuname, 3, 302, FIND_NEXT_MENU__MSG\9 || CTRL_KEY__MSG'+F',   'SEARCHDLG F'FIND_NEXT_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_FIND, 0)
  250.      buildmenuitem menuname, 3, 303, CHANGE_NEXT_MENU__MSG\9 || CTRL_KEY__MSG'+C', 'SEARCHDLG C'CHANGE_NEXT_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_CHANGE, 0)
  251. compile if WANT_BOOKMARKS
  252.      buildmenuitem menuname, 3, 304, \0,                           '',            4, 0
  253.      buildmenuitem menuname, 3, 305, BOOKMARKS_MENU__MSG,   BOOKMARKS_MENUP__MSG, 17, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  254.        buildmenuitem menuname, 3, 306, SET_MARK_MENU__MSG\9 || CTRL_KEY__MSG'+M',  'setmark'SET_MARK_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  255.  compile if EVERSION < 5.21  -- 5.21 adds a custom dialog for setting bookmarks
  256.        buildmenuitem menuname, 3, 307, '~Set permanent...', 'setmarkp',       0, 0
  257.  compile endif
  258.        buildmenuitem menuname, 3, 308, LIST_MARK_MENU__MSG\9 || CTRL_KEY__MSG'+B', 'listmark'LIST_MARK_MENUP__MSG,       0, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  259.        buildmenuitem menuname, 3, 310, \0,                  '',               4, 0
  260.        buildmenuitem menuname, 3, 311, NEXT_MARK_MENU__MSG\9 || ALT_KEY__MSG'+/',  'nextbookmark'NEXT_MARK_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  261.        buildmenuitem menuname, 3, 312, PREV_MARK_MENU__MSG\9 || ALT_KEY__MSG'+\',  'nextbookmark P'PREV_MARK_MENUP__MSG, 32768+1, mpfrom2short(HP_SEARCH_BOOKMARKS, 0)
  262. compile endif
  263. compile if WANT_TAGS
  264.      buildmenuitem menuname, 3, 320, \0,                           '',            4, 0
  265.      buildmenuitem menuname, 3, 330, TAGS_MENU__MSG,   TAGS_MENUP__MSG, 17, mpfrom2short(HP_SEARCH_TAGS, 0)
  266.  compile if EPM32
  267.        buildmenuitem menuname, 3, 331, TAGSDLG_MENU__MSG\9, 'poptagsdlg'TAGSDLG_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  268.        buildmenuitem menuname, 3, 332, \0,                  '',               4, 0
  269.  compile endif
  270.        buildmenuitem menuname, 3, 333, FIND_TAG_MENU__MSG\9 || SHIFT_KEY__MSG'+F6',  'findtag'FIND_TAG_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  271.        buildmenuitem menuname, 3, 334, FIND_TAG2_MENU__MSG\9 || SHIFT_KEY__MSG'+F7', 'findtag *'FIND_TAG2_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  272.  compile if not EPM32
  273.        buildmenuitem menuname, 3, 335, \0,                  '',               4, 0
  274.        buildmenuitem menuname, 3, 336, TAGFILE_NAME_MENU__MSG\9 || SHIFT_KEY__MSG'+F8',  'tagsfile'TAGFILE_NAME_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  275.        buildmenuitem menuname, 3, 337, \0,                  '',               4, 0
  276.        buildmenuitem menuname, 3, 338, MAKE_TAGS_MENU__MSG\9 || SHIFT_KEY__MSG'+F9',  'maketags *'MAKE_TAGS_MENUP__MSG, 0, mpfrom2short(HP_SEARCH_TAGS, 0)
  277.  compile endif
  278.        buildmenuitem menuname, 3, 339, \0,                               '',          4, 0
  279.        buildmenuitem menuname, 3, 340, SCAN_TAGS_MENU__MSG,  'tagscan'SCAN_TAGS_MENUP__MSG, 32769, mpfrom2short(HP_SEARCH_TAGS, 0)
  280. compile endif
  281.    return
  282.  
  283. ; Preferences pull-right can get Set enter, Advanced mark, Stream mode, and
  284. ; Ring enabled, in addition to Configure.  Here we calculate which menu item
  285. ; gets the "end pullright" attribute.
  286. define
  287.     NEED_PREFERENCES = 1  -- Start out assuming this
  288.  compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  289.    ENTER__ATTRIB  = 0
  290.    MARK__ATTRIB   = 0
  291.    STREAM__ATTRIB = 0
  292.    RING__ATTRIB   = 0
  293.    STACK__ATTRIB  = 0
  294.    ACCEL__ATTRIB  = 32769
  295.  compile elseif WANT_STACK_CMDS = 'SWITCH'
  296.    ENTER__ATTRIB  = 0
  297.    MARK__ATTRIB   = 0
  298.    STREAM__ATTRIB = 0
  299.    RING__ATTRIB   = 0
  300.    STACK__ATTRIB  = 32769
  301.  compile elseif RING_OPTIONAL
  302.    ENTER__ATTRIB  = 0
  303.    MARK__ATTRIB   = 0
  304.    STREAM__ATTRIB = 0
  305.    RING__ATTRIB   = 32769
  306.  compile elseif WANT_STREAM_MODE = 'SWITCH'
  307.    ENTER__ATTRIB  = 0
  308.    MARK__ATTRIB   = 0
  309.    STREAM__ATTRIB = 32769
  310.  compile elseif WANT_CUA_MARKING = 'SWITCH'
  311.    ENTER__ATTRIB  = 0
  312.    MARK__ATTRIB   = 32769
  313.  compile elseif ENHANCED_ENTER_KEYS & WANT_STREAM_MODE <> 1 & EVERSION < 5.21  -- 5.21 adds this to config dialog
  314.    ENTER__ATTRIB  = 32769
  315.  compile else
  316.     NEED_PREFERENCES = 0  -- If none of the above, we don't need this after all
  317.  compile endif
  318.  compile if EVERSION < '5.50'
  319.     TOGGLEINFO = 'toggle_info'
  320.  compile elseif EVERSION < '5.53'
  321.     TOGGLEINFO = 'togglecontrol 23'
  322.  compile else
  323.     TOGGLEINFO = 'toggleframe 32'
  324.  compile endif
  325.  
  326. compile if WANT_NODISMISS_MENUS
  327.    define
  328.       NODISMISS = 32
  329. compile else
  330.    define
  331.       NODISMISS = 0
  332. compile endif -- WANT_NODISMISS_MENUS
  333.  
  334. defproc add_options_menu(menuname)
  335. compile if RING_OPTIONAL
  336.    universal ring_enabled
  337. compile endif
  338.    universal font
  339. compile if CHECK_FOR_LEXAM
  340.    universal LEXAM_is_available
  341. compile endif
  342.  
  343.    buildsubmenu menuname, 4, OPTIONS_BAR__MSG, OPTIONS_BARP__MSG, 0 , mpfrom2short(HP_OPTIONS, 0)
  344. compile if MENU_LIMIT = 0
  345.  compile if RING_OPTIONAL
  346.    if ring_enabled then
  347.  compile endif
  348.      buildmenuitem menuname, 4, 410, LIST_FILES_MENU__MSG\9 || CTRL_KEY__MSG'+G',     'Ring_More'LIST_FILES_MENUP__MSG,  0 , mpfrom2short(HP_OPTIONS_LIST, 0)
  349.      buildmenuitem menuname, 4, 411, \0,                       '',           4, 0
  350.  compile if RING_OPTIONAL
  351.    endif
  352.  compile endif
  353. compile endif
  354. compile if SPELL_SUPPORT
  355.  compile if CHECK_FOR_LEXAM
  356.    if LEXAM_is_available then
  357.  compile endif
  358.      buildmenuitem menuname, 4, 404, PROOF_MENU__MSG,           'proof'PROOF_MENUP__MSG,     0, mpfrom2short(HP_OPTIONS_PROOF, 0)
  359.      buildmenuitem menuname, 4, 405, PROOF_WORD_MENU__MSG,      'proofword'PROOF_WORD_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_PROOFW, 0)
  360.      buildmenuitem menuname, 4, 406, SYNONYM_MENU__MSG,         'syn'SYNONYM_MENUP__MSG,       0, mpfrom2short(HP_OPTIONS_SYN, 0)
  361.      buildmenuitem menuname, 4, 450, DYNASPELL_MENU__MSG,        'dynaspell'DYNASPELL_MENUP__MSG,       0, mpfrom2short(HP_OPTIONS_DYNASPELL, 0)
  362.  compile if CORE_STUFF
  363.      buildmenuitem menuname, 4, 426, DEFINE_WORD_MENU__MSG,     'define'DEFINE_WORD_MENUP__MSG,    0, mpfrom2short(HP_OPTIONS_DEFINE, 0)
  364.  compile endif  -- CORE_STUFF
  365.      buildmenuitem menuname, 4, 407, \0,           '',                       4, 0
  366.  compile if CHECK_FOR_LEXAM
  367.    endif
  368.  compile endif
  369. compile endif
  370. ; If no "Toggle stream mode" or "Toggle advanced marking" or "Enable ring", then
  371. ; place "Configure..." on main Options menu.  Otherwise, put it on a Preferences
  372. ; pull-right with the other stuff.
  373. compile if NEED_PREFERENCES
  374.      buildmenuitem menuname, 4, 400, PREFERENCES_MENU__MSG,    PREFERENCES_MENUP__MSG,  17, mpfrom2short(HP_OPTIONS_PREFERENCES, 0)
  375. compile endif
  376. compile if WANT_APPLICATION_INI_FILE
  377.      buildmenuitem menuname, 4, 440, CONFIG_MENU__MSG,         'configdlg'CONFIG_MENUP__MSG,  0, mpfrom2short(HP_OPTIONS_CONFIG, 0)
  378.  compile if ENHANCED_ENTER_KEYS & WANT_STREAM_MODE <> 1 & EVERSION < 5.21  -- 5.21 adds this to config dialog
  379.      buildmenuitem menuname, 4, 444, SETENTER_MENU__MSG,    'config_enter'SETENTER_MENUP__MSG,  ENTER__ATTRIB, mpfrom2short(HP_OPTIONS_CFGENTER, 0)
  380.  compile endif
  381. compile endif
  382. compile if WANT_CUA_MARKING = 'SWITCH'
  383.      buildmenuitem menuname, 4, 441, ADVANCEDMARK_MENU__MSG,     'CUA_MARK_toggle'ADVANCEDMARK_MENUP__MSG, MARK__ATTRIB, mpfrom2short(HP_OPTIONS_CUATOGGLE, NODISMISS)
  384. compile endif
  385. compile if WANT_STREAM_MODE = 'SWITCH'
  386.      buildmenuitem menuname, 4, 442, STREAMMODE_MENU__MSG,  'stream_toggle'STREAMMODE_MENUP__MSG,  STREAM__ATTRIB, mpfrom2short(HP_OPTIONS_STREAM, NODISMISS)
  387. compile endif
  388. compile if RING_OPTIONAL
  389.      buildmenuitem menuname, 4, 443, RINGENABLED_MENU__MSG,    'ring_toggle'RINGENABLED_MENUP__MSG,  RING__ATTRIB, mpfrom2short(HP_OPTIONS_RINGENABLE, 0)
  390. compile endif
  391. compile if WANT_STACK_CMDS = 'SWITCH'
  392.      buildmenuitem menuname, 4, 445, STACKCMDS_MENU__MSG,      'stack_toggle'STACKCMDS_MENUP__MSG,  STACK__ATTRIB, mpfrom2short(HP_OPTIONS_STACKCMDS, 0)
  393. compile endif
  394. compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  395.      buildmenuitem menuname, 4, 446, CUAACCEL_MENU__MSG,       'accel_toggle'CUAACCEL_MENUP__MSG,  ACCEL__ATTRIB, mpfrom2short(HP_OPTIONS_CUAACCEL, NODISMISS)
  396. compile endif
  397.      buildmenuitem menuname, 4, 401, \0,                       '',           4, 0
  398.      buildmenuitem menuname, 4, 402, AUTOSAVE_MENU__MSG,       'autosave ?'AUTOSAVE_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_AUTOSAVE, 0)
  399.      buildmenuitem menuname, 4, 403, \0,                       '',           4, 0
  400.      buildmenuitem menuname, 4, 412, MESSAGES_MENU__MSG,       'messagebox'MESSAGES_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_MESSAGES, 0)
  401.      buildmenuitem menuname, 4, 409, \0,           '',                       4, 0
  402. ;  Note:  408 is referenced by TOGGLEFONT.  If the number changes, update TOGGLEFONT.
  403. compile if EVERSION < 5.50
  404.    if screenxysize('X')>1000 or dos_version()>=1030 then  -- BGA *or* 1.3 for many fonts
  405. compile endif
  406. compile if EVERSION < 5.21  -- In 5.21, on notebook config control
  407.         buildmenuitem menuname, 4, 408, CHANGE_FONT_MENU__MSG,  'fontlist'CHANGE_FONT_MENUP__MSG,    0, mpfrom2short(HP_OPTIONS_FONT, 0)
  408. compile endif
  409. compile if EVERSION < 5.50
  410.    else
  411.       if font then
  412.         buildmenuitem menuname, 4, 408, SMALL_FONT_MENU__MSG,    'togglefont'SMALL_FONT_MENUP__MSG,  0, mpfrom2short(HP_OPTIONS_FONT, 0)
  413.       else
  414.         buildmenuitem menuname, 4, 408, LARGE_FONT_MENU__MSG,    'togglefont'LARGE_FONT_MENUP__MSG,  0, mpfrom2short(HP_OPTIONS_FONT, 0)
  415.       endif
  416.    endif
  417. compile endif
  418.  
  419.      buildmenuitem menuname, 4, 425, FRAME_CTRLS_MENU__MSG, FRAME_CTRLS_MENUP__MSG, 17, mpfrom2short(HP_OPTIONS_FRAME, 0)
  420. compile if EVERSION < 5.53
  421.         buildmenuitem menuname, 4, 413, STATUS_LINE_MENU__MSG, 'togglecontrol 7'STATUS_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_STATUS, NODISMISS)
  422.         buildmenuitem menuname, 4, 414, MSG_LINE_MENU__MSG,    'togglecontrol 8'MSG_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_MESSAGE, NODISMISS)
  423. compile else
  424.         buildmenuitem menuname, 4, 413, STATUS_LINE_MENU__MSG, 'toggleframe 1'STATUS_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_STATUS, NODISMISS)
  425.         buildmenuitem menuname, 4, 414, MSG_LINE_MENU__MSG,    'toggleframe 2'MSG_LINE_MENUP__MSG, 0, mpfrom2short(HP_FRAME_MESSAGE, NODISMISS)
  426. compile endif
  427.         buildmenuitem menuname, 4, 415, SCROLL_BARS_MENU__MSG, 'setscrolls'SCROLL_BARS_MENUP__MSG,      0, mpfrom2short(HP_FRAME_SCROLL, NODISMISS)
  428. ;;      buildmenuitem menuname, 4, 416, 'Partial te~xt',       'togglecontrol 15', 32768+1, 0, 0
  429. compile if EVERSION < 5.50
  430.         buildmenuitem menuname, 4, 416, FILEICON_MENU__MSG,     'togglecontrol 22'FILEICON_MENUP__MSG, 0, mpfrom2short(HP_FRAME_FILE, NODISMISS)
  431. compile endif
  432. compile if EVERSION < 5.53
  433.         buildmenuitem menuname, 4, 417, ROTATEBUTTONS_MENU__MSG,'togglecontrol 20'ROTATEBUTTONS_MENUP__MSG, 0, mpfrom2short(HP_FRAME_ROTATE, NODISMISS)
  434. compile else
  435.         buildmenuitem menuname, 4, 417, ROTATEBUTTONS_MENU__MSG,'toggleframe 4'ROTATEBUTTONS_MENUP__MSG, 0, mpfrom2short(HP_FRAME_ROTATE, NODISMISS)
  436. compile endif
  437. compile if WANT_TOOLBAR
  438. ; compile if WANT_NODISMISS_MENUS
  439.         buildmenuitem menuname, 4, 430, TOGGLETOOLBAR_MENU__MSG, 'toggle_toolbar'TOGGLETOOLBAR_MENUP__MSG, 1, mpfrom2short(HP_TOOLBAR_TOGGLE, NODISMISS)
  440. ; compile else
  441. ;       buildmenuitem menuname, 4, 430, TOGGLETOOLBAR_MENU__MSG, 'toggleframe' EFRAMEF_TOOLBAR||TOGGLETOOLBAR_MENUP__MSG, 1, mpfrom2short(HP_TOOLBAR_TOGGLE, NODISMISS)
  442. ; compile endif -- if WANT_NODISMISS_MENUS
  443. compile endif -- WANT_TOOLBAR
  444. compile if EVERSION >= 5.60
  445.         buildmenuitem menuname, 4, 437, TOGGLEBITMAP_MENU__MSG,'toggle_bitmap'TOGGLEBITMAP_MENUP__MSG, 0, mpfrom2short(HP_FRAME_BITMAP, NODISMISS)
  446. compile endif
  447.         buildmenuitem menuname, 4, 439, \0,                       '',           4, 0
  448. compile if WANT_DYNAMIC_PROMPTS
  449.         buildmenuitem menuname, 4, 421, INFOATTOP_MENU__MSG,   TOGGLEINFO || INFOATTOP_MENUP__MSG,     0, mpfrom2short(HP_FRAME_EXTRAPOS, NODISMISS)
  450.         buildmenuitem menuname, 4, 422, PROMPTING_MENU__MSG,   'toggleprompt'PROMPTING_MENUP__MSG,     32768+1, mpfrom2short(HP_FRAME_PROMPT, NODISMISS)
  451. compile else
  452.         buildmenuitem menuname, 4, 421, INFOATTOP_MENU__MSG,   TOGGLEINFO || INFOATTOP_MENUP__MSG,     32768+1, mpfrom2short(HP_FRAME_EXTRAPOS, NODISMISS)
  453. compile endif
  454. compile if WANT_APPLICATION_INI_FILE
  455.      buildmenuitem menuname, 4, 418, SAVE_OPTS_MENU__MSG,      'saveoptions'SAVE_OPTS_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_SAVE, 0)
  456. compile endif
  457. compile if EPATH = 'LAMPATH'
  458.      buildmenuitem menuname, 4, 419, \0,                       '',           4, 0
  459.      buildmenuitem menuname, 4, 420, TO_DESKTOP_MENU__MSG,     'popbook'TO_DESKTOP_MENUP__MSG, 0, 0
  460. compile elseif SUPPORT_BOOK_ICON
  461.      buildmenuitem menuname, 4, 419, \0,                       '',           4, 0
  462.      buildmenuitem menuname, 4, 420, TO_BOOK_MENU__MSG,        'popbook'TO_BOOK_MENUP__MSG, 0, mpfrom2short(HP_OPTIONS_BOOK, 0)
  463. compile endif
  464.    return
  465.  
  466. compile if MENU_LIMIT
  467. defproc add_ring_menu(menuname)
  468.    buildsubmenu menuname, 5, RING_BAR__MSG, LIST_FILES_MENUP__MSG, 0 , 0
  469.      if .titletext=='' then
  470.         buildmenuitem menuname, 5, 500, .filename, '',0,0
  471.      else
  472.         buildmenuitem menuname, 5, 500, .titletext, '',0,0
  473.      endif
  474.    return
  475. compile endif
  476.  
  477. defproc add_command_menu(menuname)
  478.    buildsubmenu menuname, 1, COMMAND_BAR__MSG, COMMAND_BARP__MSG, 0 , mpfrom2short(HP_COMMAND, 0)
  479.      buildmenuitem menuname, 1, 100, COMMANDLINE_MENU__MSG\9 || CTRL_KEY__MSG'+I', 'commandline'COMMANDLINE_MENUP__MSG,   0, mpfrom2short(HP_COMMAND_CMD, 0)
  480. compile if EVERSION >= 5.50
  481.      buildmenuitem menuname, 1, 65535, HALT_COMMAND_MENU__MSG, '', 0, mpfrom2short(HP_COMMAND_HALT, 0)
  482. compile else
  483.      buildmenuitem menuname, 1, 0, HALT_COMMAND_MENU__MSG, '', 0, mpfrom2short(HP_COMMAND_HALT, 0)
  484. compile endif
  485. compile if WANT_EPM_SHELL = 1
  486.      buildmenuitem menuname, 1, 101, \0,                      '',            4, 0
  487.      buildmenuitem menuname, 1, 102, CREATE_SHELL_MENU__MSG,       'shell'CREATE_SHELL_MENUP__MSG,       0, mpfrom2short(HP_COMMAND_SHELL, 0)
  488.      buildmenuitem menuname, 1, 103, WRITE_SHELL_MENU__MSG,        'shell_write'WRITE_SHELL_MENUP__MSG, 0, mpfrom2short(HP_COMMAND_WRITE, 16384)
  489. ;    buildmenuitem menuname, 1, 104, KILL_SHELL_MENU__MSG,         'shell_kill'KILL_SHELL_MENUP__MSG,  0, mpfrom2short(HP_COMMAND_KILL, 16384)
  490.  compile if EPM32 & not POWERPC
  491.      buildmenuitem menuname, 1, 104, SHELL_BREAK_MENU__MSG,        'shell_break'SHELL_BREAK_MENUP__MSG,  0, mpfrom2short(HP_COMMAND_BREAK, 16384)
  492.  compile endif
  493. compile endif
  494.    return
  495.  
  496. defproc add_help_menu(menuname)
  497.    buildsubmenu menuname, HELP_MENU_ID, HELP_BAR__MSG, 'help'HELP_BARP__MSG, /* 512 */  0, mpfrom2short(HP_HELP, 0)
  498.      buildmenuitem menuname, HELP_MENU_ID, 600, HELP_INDEX_MENU__MSG,   'helpmenu 10'/*64044*/HELP_INDEX_MENUP__MSG,   0, mpfrom2short(HP_HELP_INDEX, 0)
  499.      buildmenuitem menuname, HELP_MENU_ID, 601, EXT_HELP_MENU__MSG,     'helpmenu 4000'EXT_HELP_MENUP__MSG, 0, mpfrom2short(HP_HELP_EXTENDED, 0)
  500.      buildmenuitem menuname, HELP_MENU_ID, 602, HELP_HELP_MENU__MSG,    'helpmenu 64027'HELP_HELP_MENUP__MSG,    0, mpfrom2short(HP_HELP_HELP, 0)
  501.      buildmenuitem menuname, HELP_MENU_ID, 603, KEYS_HELP_MENU__MSG,    'helpmenu 1000'KEYS_HELP_MENUP__MSG, 0, mpfrom2short(HP_HELP_KEYS, 0)
  502.      buildmenuitem menuname, HELP_MENU_ID, 604, COMMANDS_HELP_MENU__MSG,'helpmenu 2000'COMMANDS_HELP_MENUP__MSG, 0, mpfrom2short(HP_HELP_COMMANDS, 0)
  503.      buildmenuitem menuname, HELP_MENU_ID, 605, \0,           '',                        4, 0
  504.      buildmenuitem menuname, HELP_MENU_ID, 606, HELP_BROWSER_MENU__MSG, 'help'HELP_BROWSER_MENUP__MSG,    0, mpfrom2short(HP_HELP_BROWSE, 0)
  505.      buildmenuitem menuname, HELP_MENU_ID, 607, \0,           '',                        4, 0
  506. compile if 0
  507.      buildmenuitem menuname, HELP_MENU_ID, 608, '#211'||(3-(screenxysize('X')>1000)), 'IBMmsg'HELP_PROD_MENUP__MSG, 2, mpfrom2short(HP_HELP_IBM, 0)
  508.                          -- Resource # 2112 or 2113 in ERES.DLL
  509. compile else
  510.      buildmenuitem menuname, HELP_MENU_ID, 608, HELP_PROD_MENU__MSG, 'IBMmsg'HELP_PROD_MENUP__MSG, 0, mpfrom2short(HP_HELP_PROD, 0)
  511. compile endif
  512. compile if SUPPORT_USERS_GUIDE | SUPPORT_TECHREF
  513.      buildmenuitem menuname, HELP_MENU_ID, 610, \0,           '',                        4, 0
  514.  compile if SUPPORT_USERS_GUIDE
  515.      buildmenuitem menuname, HELP_MENU_ID, 620, USERS_GUIDE_MENU__MSG,   USERS_GUIDE_MENUP__MSG, 17+64, mpfrom2short(HP_HELP_USERS_GUIDE, 0)
  516.        buildmenuitem menuname, HELP_MENU_ID, 621, VIEW_USERS_MENU__MSG,  'view epmusers'VIEW_USERS_MENUP__MSG, 0, mpfrom2short(HP_HELP_USERS_GUIDE, 0)
  517.        buildmenuitem menuname, HELP_MENU_ID, 622, VIEW_IN_USERS_MENU__MSG,  'viewword epmusers'VIEW_IN_USERS_MENUP__MSG, 0, mpfrom2short(HP_HELP_USERS_GUIDE, 0)
  518.        buildmenuitem menuname, HELP_MENU_ID, 623, VIEW_USERS_SUMMARY_MENU__MSG,  'view epmusers Summary'VIEW_USERS_SUMMARY_MENUP__MSG, 32768+1, mpfrom2short(HP_HELP_USERS_GUIDE, 0)
  519.  compile endif
  520.  compile if SUPPORT_TECHREF
  521.      buildmenuitem menuname, HELP_MENU_ID, 630, TECHREF_MENU__MSG,   TECHREF_MENUP__MSG, 17+64, mpfrom2short(HP_HELP_TECHREF, 0)
  522.        buildmenuitem menuname, HELP_MENU_ID, 631, VIEW_TECHREF_MENU__MSG,  'view epmtech'VIEW_TECHREF_MENUP__MSG, 0, mpfrom2short(HP_HELP_TECHREF, 0)
  523.        buildmenuitem menuname, HELP_MENU_ID, 632, VIEW_IN_TECHREF_MENU__MSG,  'viewword epmtech'VIEW_IN_TECHREF_MENUP__MSG, 32768+1, mpfrom2short(HP_HELP_TECHREF, 0)
  524.  compile endif
  525. compile endif
  526.  
  527. defproc readd_help_menu
  528.    universal defaultmenu, activemenu
  529.    call add_help_menu(defaultmenu)
  530.    call maybe_show_menu()
  531.  
  532. defproc maybe_show_menu
  533.    universal defaultmenu, activemenu
  534.    if activemenu=defaultmenu then
  535.       call showmenu_activemenu()  -- show the updated EPM menu
  536.    endif
  537.  
  538. defproc showmenu_activemenu()
  539.    universal activemenu
  540.    showmenu activemenu  -- show the updated EPM menu
  541. compile if SUPPORT_USERS_GUIDE
  542.    'postme cascade_menu 620'
  543. compile endif
  544. compile if SUPPORT_TECHREF
  545.    'postme cascade_menu 630'
  546. compile endif
  547. compile if defined(CUSTEPM_DEFAULT_SCREEN)
  548.    'postme cascade_menu' 3700 (CUSTEPM_DEFAULT_SCREEN + 3700)
  549. compile elseif defined(HAVE_CUSTEPM)
  550.    'postme cascade_menu' 3700
  551. compile endif
  552.  
  553. compile if EVERSION > 5.20
  554. defproc build_menu_accelerators(activeaccel)
  555.  compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  556.    universal CUA_MENU_ACCEL
  557.  compile endif
  558. compile if WANT_STACK_CMDS = 'SWITCH'
  559.    universal stack_cmds
  560. compile endif
  561.                        -- Build keys on File menu
  562.    buildacceltable activeaccel, 'dokey F8',  AF_VIRTUALKEY,                VK_F8, 1101  -- F8
  563.    buildacceltable activeaccel, 'dokey c+O', AF_CHAR+AF_CONTROL,              79, 1102  -- c+O
  564.    buildacceltable activeaccel, 'dokey c+O', AF_CHAR+AF_CONTROL,             111, 1103  -- c+o
  565.    buildacceltable activeaccel, 'dokey F7',  AF_VIRTUALKEY,                VK_F7, 1104  -- F7
  566.    buildacceltable activeaccel, 'dokey F2',  AF_VIRTUALKEY,                VK_F2, 1105  -- F2
  567.    buildacceltable activeaccel, 'dokey F3',  AF_VIRTUALKEY,                VK_F3, 1106  -- F3
  568.    buildacceltable activeaccel, 'dokey F4',  AF_VIRTUALKEY,                VK_F4, 1107  -- F4
  569.  
  570.                        -- Build keys on Edit menu  ('C' & 'O' appear under Action bar keys for English)
  571.   compile if FILE_ACCEL__L <> 'C' & EDIT_ACCEL__L <> 'C' & SEARCH_ACCEL__L <> 'C' & OPTIONS_ACCEL__L <> 'C' & COMMAND_ACCEL__L <> 'C' & HELP_ACCEL__L <> 'C' & $maybe_mail_accel 'C' & $maybe_ring_accel 'C' & $maybe_actions_accel 'C'
  572.    buildacceltable activeaccel, 'dokey a+C', AF_CHAR+AF_ALT,                  67, 1201  -- a+C
  573.    buildacceltable activeaccel, 'dokey a+C', AF_CHAR+AF_ALT,                  99, 1202  -- a+c
  574.   compile endif
  575.   compile if FILE_ACCEL__L <> 'M' & EDIT_ACCEL__L <> 'M' & SEARCH_ACCEL__L <> 'M' & OPTIONS_ACCEL__L <> 'M' & COMMAND_ACCEL__L <> 'M' & HELP_ACCEL__L <> 'M' & $maybe_mail_accel 'M' & $maybe_ring_accel 'M' & $maybe_actions_accel 'M'
  576.    buildacceltable activeaccel, 'dokey a+M', AF_CHAR+AF_ALT,                  77, 1203  -- a+M
  577.    buildacceltable activeaccel, 'dokey a+M', AF_CHAR+AF_ALT,                 109, 1204  -- a+m
  578.   compile endif
  579.   compile if FILE_ACCEL__L <> 'O' & EDIT_ACCEL__L <> 'O' & SEARCH_ACCEL__L <> 'O' & OPTIONS_ACCEL__L <> 'O' & COMMAND_ACCEL__L <> 'O' & HELP_ACCEL__L <> 'O' & $maybe_mail_accel 'O' & $maybe_ring_accel 'O' & $maybe_actions_accel 'O'
  580.    buildacceltable activeaccel, 'dokey a+O', AF_CHAR+AF_ALT,                  79, 1205  -- a+O
  581.    buildacceltable activeaccel, 'dokey a+O', AF_CHAR+AF_ALT,                 111, 1206  -- a+o
  582.   compile endif
  583.   compile if FILE_ACCEL__L <> 'A' & EDIT_ACCEL__L <> 'A' & SEARCH_ACCEL__L <> 'A' & OPTIONS_ACCEL__L <> 'A' & COMMAND_ACCEL__L <> 'A' & HELP_ACCEL__L <> 'A' & $maybe_mail_accel 'A' & $maybe_ring_accel 'A' & $maybe_actions_accel 'A'
  584.    buildacceltable activeaccel, 'dokey a+A', AF_CHAR+AF_ALT,                  65, 1207  -- a+A
  585.    buildacceltable activeaccel, 'dokey a+A', AF_CHAR+AF_ALT,                  97, 1208  -- a+a
  586.   compile endif
  587.   compile if FILE_ACCEL__L <> 'U' & EDIT_ACCEL__L <> 'U' & SEARCH_ACCEL__L <> 'U' & OPTIONS_ACCEL__L <> 'U' & COMMAND_ACCEL__L <> 'U' & HELP_ACCEL__L <> 'U' & $maybe_mail_accel 'U' & $maybe_ring_accel 'U' & $maybe_actions_accel 'U'
  588.    buildacceltable activeaccel, 'dokey a+U', AF_CHAR+AF_ALT,                  85, 1209  -- a+U
  589.    buildacceltable activeaccel, 'dokey a+U', AF_CHAR+AF_ALT,                 117, 1210  -- a+u
  590.   compile endif
  591.   compile if FILE_ACCEL__L <> 'D' & EDIT_ACCEL__L <> 'D' & SEARCH_ACCEL__L <> 'D' & OPTIONS_ACCEL__L <> 'D' & COMMAND_ACCEL__L <> 'D' & HELP_ACCEL__L <> 'D' & $maybe_mail_accel 'D' & $maybe_ring_accel 'D' & $maybe_actions_accel 'D'
  592.    buildacceltable activeaccel, 'dokey a+D', AF_CHAR+AF_ALT,                  68, 1211  -- a+D
  593.    buildacceltable activeaccel, 'dokey a+D', AF_CHAR+AF_ALT,                 100, 1212  -- a+d
  594.   compile endif
  595.    buildacceltable activeaccel, 'copy2clip', AF_VIRTUALKEY+AF_CONTROL, VK_INSERT, 1213  -- c+Insert
  596.    buildacceltable activeaccel, 'cut',       AF_VIRTUALKEY+AF_SHIFT,   VK_DELETE, 1214  -- s+Delete
  597.    buildacceltable activeaccel, 'paste' DEFAULT_PASTE, AF_VIRTUALKEY+AF_SHIFT,   VK_INSERT, 1215  -- s+Insert
  598.    buildacceltable activeaccel, 'paste' ALTERNATE_PASTE, AF_VIRTUALKEY+AF_SHIFT+AF_CONTROL,   VK_INSERT, 1221  -- c+s+Insert
  599.    buildacceltable activeaccel, 'dokey F9',  AF_VIRTUALKEY,                VK_F9, 1216  -- F9
  600.   compile if EVERSION >= 5.50
  601.    buildacceltable activeaccel, 'dokey c+Y', AF_CHAR+AF_CONTROL,              89, 1217  -- c+Y
  602.    buildacceltable activeaccel, 'dokey c+Y', AF_CHAR+AF_CONTROL,             121, 1218  -- c+y
  603.   compile endif
  604.    buildacceltable activeaccel, 'select_all',AF_CHAR+AF_CONTROL,              47, 1219  -- c+/
  605.    buildacceltable activeaccel, 'DUPMARK U', AF_CHAR+AF_CONTROL,              92, 1220  -- c+\
  606.  
  607. compile if WANT_STACK_CMDS
  608.  compile if WANT_STACK_CMDS = 'SWITCH'
  609.    if stack_cmds then
  610.  compile endif
  611.    buildacceltable activeaccel, 'dokey c+down', AF_VIRTUALKEY+AF_CONTROL,   VK_DOWN, 1222  -- c+Down
  612.    buildacceltable activeaccel, 'dokey c+Up',   AF_VIRTUALKEY+AF_CONTROL,     VK_UP, 1223  -- c+Up
  613.  compile if WANT_STACK_CMDS = 'SWITCH'
  614.    endif
  615.  compile endif
  616.    buildacceltable activeaccel, 'swappos',  AF_CHAR+AF_CONTROL,                     61, 1224  -- c+=
  617.    buildacceltable activeaccel, 'pushmark', AF_VIRTUALKEY+AF_CONTROL+AF_SHIFT, VK_DOWN, 1225  -- c+s+Down
  618.    buildacceltable activeaccel, 'popmark',  AF_VIRTUALKEY+AF_CONTROL+AF_SHIFT,   VK_UP, 1226  -- c+s+Up
  619.    buildacceltable activeaccel, 'swapmark', AF_CHAR+AF_CONTROL+AF_SHIFT,            61, 1227  -- c+s+=
  620.    buildacceltable activeaccel, 'swapmark', AF_CHAR+AF_CONTROL+AF_SHIFT,            43, 1228  -- c+s++
  621. compile endif
  622.  
  623.                        -- Build keys on Search menu
  624.    buildacceltable activeaccel, 'dokey c+S', AF_CHAR+AF_CONTROL,              83, 1301  -- c+S
  625.    buildacceltable activeaccel, 'dokey c+S', AF_CHAR+AF_CONTROL,             115, 1302  -- c+s
  626.    buildacceltable activeaccel, 'dokey c+F', AF_CHAR+AF_CONTROL,              70, 1303  -- c+F
  627.    buildacceltable activeaccel, 'dokey c+F', AF_CHAR+AF_CONTROL,             102, 1304  -- c+f
  628.    buildacceltable activeaccel, 'dokey c+C', AF_CHAR+AF_CONTROL,              67, 1305  -- c+C
  629.    buildacceltable activeaccel, 'dokey c+C', AF_CHAR+AF_CONTROL,              99, 1306  -- c+c
  630.                        -- Build keys on Bookmark submenu
  631.   compile if WANT_BOOKMARKS
  632.    buildacceltable activeaccel, 'dokey c+B', AF_CHAR+AF_CONTROL,              66, 1331  -- c+B
  633.    buildacceltable activeaccel, 'dokey c+B', AF_CHAR+AF_CONTROL,              98, 1332  -- c+b
  634.    buildacceltable activeaccel, 'dokey c+M', AF_CHAR+AF_CONTROL,              77, 1333  -- c+M
  635.    buildacceltable activeaccel, 'dokey c+M', AF_CHAR+AF_CONTROL,             109, 1334  -- c+m
  636.    buildacceltable activeaccel, 'nextbookmark',  AF_CHAR+AF_ALT,              47, 1335  -- a+/
  637.    buildacceltable activeaccel, 'nextbookmark P',AF_CHAR+AF_ALT,              92, 1336  -- a+\
  638.   compile endif
  639.                        -- Build keys on Tags submenu
  640.   compile if WANT_TAGS
  641.    buildacceltable activeaccel, 'dokey s+F6', AF_VIRTUALKEY+AF_SHIFT,      VK_F6, 1361  -- s+F6
  642.    buildacceltable activeaccel, 'dokey s+F7', AF_VIRTUALKEY+AF_SHIFT,      VK_F7, 1362  -- s+F7
  643.    buildacceltable activeaccel, 'dokey s+F8', AF_VIRTUALKEY+AF_SHIFT,      VK_F8, 1363  -- s+F8
  644.    buildacceltable activeaccel, 'dokey s+F9', AF_VIRTUALKEY+AF_SHIFT,      VK_F9, 1364  -- s+F9
  645.   compile endif
  646.  
  647.                        -- Build keys on Options menu
  648.    buildacceltable activeaccel, 'dokey c+G', AF_CHAR+AF_CONTROL,              71, 1401  -- c+G
  649.    buildacceltable activeaccel, 'dokey c+G', AF_CHAR+AF_CONTROL,             103, 1402  -- c+g
  650.  
  651.                        -- Build keys on Command menu
  652.    buildacceltable activeaccel, 'dokey c+I', AF_CHAR+AF_CONTROL,              73, 1501  -- c+I
  653.    buildacceltable activeaccel, 'dokey c+I', AF_CHAR+AF_CONTROL,             105, 1502  -- c+i
  654.  
  655.                        -- Block action bar accelerator keys (English)
  656.   compile if BLOCK_ACTIONBAR_ACCELERATORS
  657.    compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  658.    if not CUA_MENU_ACCEL then
  659.    compile endif
  660.    buildacceltable activeaccel, 'dokey a+'FILE_ACCEL__L,    AF_CHAR+AF_ALT, FILE_ACCEL__A1   , 1001  -- a+F
  661.    buildacceltable activeaccel, 'dokey a+'FILE_ACCEL__L,    AF_CHAR+AF_ALT, FILE_ACCEL__A2   , 1002  -- a+f
  662.    buildacceltable activeaccel, 'dokey a+'EDIT_ACCEL__L,    AF_CHAR+AF_ALT, EDIT_ACCEL__A1   , 1003  -- a+E
  663.    buildacceltable activeaccel, 'dokey a+'EDIT_ACCEL__L,    AF_CHAR+AF_ALT, EDIT_ACCEL__A2   , 1004  -- a+e
  664.    buildacceltable activeaccel, 'dokey a+'SEARCH_ACCEL__L,  AF_CHAR+AF_ALT, SEARCH_ACCEL__A1 , 1005  -- a+S
  665.    buildacceltable activeaccel, 'dokey a+'SEARCH_ACCEL__L,  AF_CHAR+AF_ALT, SEARCH_ACCEL__A2 , 1006  -- a+s
  666.    buildacceltable activeaccel, 'dokey a+'OPTIONS_ACCEL__L, AF_CHAR+AF_ALT, OPTIONS_ACCEL__A1, 1007  -- a+O
  667.    buildacceltable activeaccel, 'dokey a+'OPTIONS_ACCEL__L, AF_CHAR+AF_ALT, OPTIONS_ACCEL__A2, 1008  -- a+o
  668.    buildacceltable activeaccel, 'dokey a+'COMMAND_ACCEL__L, AF_CHAR+AF_ALT, COMMAND_ACCEL__A1, 1009  -- a+C
  669.    buildacceltable activeaccel, 'dokey a+'COMMAND_ACCEL__L, AF_CHAR+AF_ALT, COMMAND_ACCEL__A2, 1010  -- a+c
  670.    buildacceltable activeaccel, 'dokey a+'HELP_ACCEL__L,    AF_CHAR+AF_ALT, HELP_ACCEL__A1   , 1011  -- a+H
  671.    buildacceltable activeaccel, 'dokey a+'HELP_ACCEL__L,    AF_CHAR+AF_ALT, HELP_ACCEL__A2   , 1012  -- a+h
  672.    compile if MENU_LIMIT
  673.    buildacceltable activeaccel, 'dokey a+'RING_ACCEL__L,    AF_CHAR+AF_ALT, RING_ACCEL__A1   , 1013  -- a+R
  674.    buildacceltable activeaccel, 'dokey a+'RING_ACCEL__L,    AF_CHAR+AF_ALT, RING_ACCEL__A2   , 1014  -- a+r
  675.    compile endif
  676.    compile if EPATH = 'LAMPATH'
  677.    buildacceltable activeaccel, 'dokey a+'MAIL_ACCEL__L,    AF_CHAR+AF_ALT, MAIL_ACCEL__A1   , 1015  -- a+M
  678.    buildacceltable activeaccel, 'dokey a+'MAIL_ACCEL__L,    AF_CHAR+AF_ALT, MAIL_ACCEL__A2   , 1016  -- a+m
  679.    compile endif
  680.    compile if defined(ACTIONS_ACCEL__L)  -- For CUSTEPM support
  681.    buildacceltable activeaccel, 'dokey a+'ACTIONS_ACCEL__L, AF_CHAR+AF_ALT, ACTIONS_ACCEL__A1, 1017  -- a+A
  682.    buildacceltable activeaccel, 'dokey a+'ACTIONS_ACCEL__L, AF_CHAR+AF_ALT, ACTIONS_ACCEL__A2, 1018  -- a+a
  683.    compile endif
  684.    compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  685.    endif -- CUA_MENU_ACCEL
  686.    compile endif
  687.   compile endif -- BLOCK_ACTIONBAR_ACCELERATORS
  688. compile endif  -- EVERSION > 5.20
  689.  
  690. compile if BLOCK_ACTIONBAR_ACCELERATORS = 'SWITCH'
  691. define  -- Prepare for some conditional tests
  692.  compile if EPATH = 'LAMPATH'  -- If LaMail, "Mail" will be on action bar
  693.    maybe_mail_accel = 'MAIL_ACCEL__L ='
  694.  compile else                  -- otherwise, it won't
  695.    maybe_mail_accel = "' ' ="    -- Will be false for any letter
  696.  compile endif
  697.  compile if MENU_LIMIT
  698.    maybe_ring_accel = 'RING_ACCEL__L ='
  699.  compile else
  700.    maybe_ring_accel = "' ' ="  -- Will be false for any letter
  701.  compile endif
  702.  compile if defined(ACTIONS_ACCEL__L)  -- For CUSTEPM support
  703.    maybe_actions_accel = 'ACTIONS_ACCEL__L ='
  704.  compile else
  705.    maybe_actions_accel = "' ' ="  -- Will be false for any letter
  706.  compile endif
  707.  
  708. defproc update_edit_menu_text =
  709.    universal CUA_MENU_ACCEL
  710.    accel_len = (3+length(ALT_KEY__MSG))*(not CUA_MENU_ACCEL)
  711.  
  712.  compile if FILE_ACCEL__L = 'C' | EDIT_ACCEL__L = 'C' | SEARCH_ACCEL__L = 'C' | OPTIONS_ACCEL__L = 'C' | COMMAND_ACCEL__L = 'C' | HELP_ACCEL__L = 'C' | $maybe_mail_accel 'C' | $maybe_ring_accel 'C' | $maybe_actions_accel 'C'
  713.    menutext = COPY_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+C', accel_len)\0
  714.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  715.                       398,                  -- x18e, MM_SetItemText
  716.                       800 + 65536,
  717.                       ltoa(offset(menutext) || selector(menutext), 10) )
  718.  compile endif
  719.  
  720.  compile if FILE_ACCEL__L = 'M' | EDIT_ACCEL__L = 'M' | SEARCH_ACCEL__L = 'M' | OPTIONS_ACCEL__L = 'M' | COMMAND_ACCEL__L = 'M' | HELP_ACCEL__L = 'M' | $maybe_mail_accel 'M' | $maybe_ring_accel 'M' | $maybe_actions_accel 'M'
  721.    menutext = MOVE_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+M', accel_len)\0
  722.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  723.                       398,                  -- x18e, MM_SetItemText
  724.                       801 + 65536,
  725.                       ltoa(offset(menutext) || selector(menutext), 10) )
  726.  compile endif
  727.  
  728.  compile if FILE_ACCEL__L = 'O' | EDIT_ACCEL__L = 'O' | SEARCH_ACCEL__L = 'O' | OPTIONS_ACCEL__L = 'O' | COMMAND_ACCEL__L = 'O' | HELP_ACCEL__L = 'O' | $maybe_mail_accel 'O' | $maybe_ring_accel 'O' | $maybe_actions_accel 'O'
  729.    menutext = OVERLAY_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+O', accel_len)\0
  730.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  731.                       398,                  -- x18e, MM_SetItemText
  732.                       802 + 65536,
  733.                       ltoa(offset(menutext) || selector(menutext), 10) )
  734.  compile endif
  735.  
  736.  compile if FILE_ACCEL__L = 'A' | EDIT_ACCEL__L = 'A' | SEARCH_ACCEL__L = 'A' | OPTIONS_ACCEL__L = 'A' | COMMAND_ACCEL__L = 'A' | HELP_ACCEL__L = 'A' | $maybe_mail_accel 'A' | $maybe_ring_accel 'A' | $maybe_actions_accel 'A'
  737.    menutext = ADJUST_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+A', accel_len)\0
  738.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  739.                       398,                  -- x18e, MM_SetItemText
  740.                       803 + 65536,
  741.                       ltoa(offset(menutext) || selector(menutext), 10) )
  742.  compile endif
  743.  
  744.  compile if FILE_ACCEL__L = 'U' | EDIT_ACCEL__L = 'U' | SEARCH_ACCEL__L = 'U' | OPTIONS_ACCEL__L = 'U' | COMMAND_ACCEL__L = 'U' | HELP_ACCEL__L = 'U' | $maybe_mail_accel 'U' | $maybe_ring_accel 'U' | $maybe_actions_accel 'U'
  745.    menutext = UNMARK_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+U', accel_len)\0
  746.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  747.                       398,                  -- x18e, MM_SetItemText
  748.                       805 + 65536,
  749.                       ltoa(offset(menutext) || selector(menutext), 10) )
  750.  compile endif
  751.  
  752.  compile if FILE_ACCEL__L = 'D' | EDIT_ACCEL__L = 'D' | SEARCH_ACCEL__L = 'D' | OPTIONS_ACCEL__L = 'D' | COMMAND_ACCEL__L = 'D' | HELP_ACCEL__L = 'D' | $maybe_mail_accel 'D' | $maybe_ring_accel 'D' | $maybe_actions_accel 'D'
  753.    menutext = DELETE_MARK_MENU__MSG || leftstr(\9 || ALT_KEY__MSG'+D', accel_len)\0
  754.    call windowmessage(1, getpminfo(EPMINFO_EDITMENUHWND),
  755.                       398,                  -- x18e, MM_SetItemText
  756.                       806 + 65536,
  757.                       ltoa(offset(menutext) || selector(menutext), 10) )
  758.  compile endif
  759.  
  760. compile endif
  761.