| 1 |
/*************************************************************************** |
| 2 |
* This program is Copyright (C) 1991-1999 by C.H.Lindsey, University of * |
| 3 |
* Manchester. (X)JOVETOOL is provided to you without charge, and with no * |
| 4 |
* warranty. You may copy, modify, and/or distribute (X)JOVETOOL, * |
| 5 |
* provided that this notice is included in all the files, except insofar * |
| 6 |
* as a more specific copyright notices attaches to the file (x)jovetool.c * |
| 7 |
***************************************************************************/ |
| 8 |
|
| 9 |
/* |
| 10 |
* Note that the key bindings shown in the various menus below include some |
| 11 |
* for the Sun function keys. These presuppose that the provided jove.rc.sun |
| 12 |
* or jove.rc.sun-cmd (or even jove.rc.xterm) is being used. If some other |
| 13 |
* conventional binding is in use locally, this file should be ammended |
| 14 |
* accordingly. |
| 15 |
* |
| 16 |
* The following commands are not given menu items. |
| 17 |
* - because they involve some kind of self-insertion: |
| 18 |
* digit-[0-9] |
| 19 |
* digit-minus |
| 20 |
* paren-flash |
| 21 |
* self-insert |
| 22 |
* |
| 23 |
* - because it is not usefully executed: |
| 24 |
* unbound |
| 25 |
* |
| 26 |
* - because they are mouse actions: |
| 27 |
* xj-mouse-copy-cut |
| 28 |
* xj-mouse-line |
| 29 |
* xj-mouse-mark |
| 30 |
* xj-mouse-point |
| 31 |
* xj-mouse-word |
| 32 |
* xj-mouse-yank |
| 33 |
* xt-mouse-mark |
| 34 |
* xt-mouse-point |
| 35 |
* xt-mouse-up |
| 36 |
* |
| 37 |
* |
| 38 |
* The "xt-mouse" variable is not supported because it doesn't |
| 39 |
* apply to this "terminal". |
| 40 |
*/ |
| 41 |
|
| 42 |
VARPROC(var_variables_proc, variables_menu) |
| 43 |
VARPROC(var_files_proc, var_files_menu) |
| 44 |
VARPROC(var_modes_proc, var_modes_menu) |
| 45 |
VARPROC(var_move_proc, var_move_menu) |
| 46 |
VARPROC(var_search_proc, var_search_menu) |
| 47 |
VARPROC(var_process_proc, var_process_menu) |
| 48 |
VARPROC(var_compile_proc, var_compile_menu) |
| 49 |
VARPROC(var_format_proc, var_format_menu) |
| 50 |
VARPROC(var_misc_proc, var_misc_menu) |
| 51 |
|
| 52 |
void |
| 53 |
menu_init() |
| 54 |
{ |
| 55 |
describing = printing = 0; |
| 56 |
|
| 57 |
empty_menu_item = menu_create_item( |
| 58 |
MENU_STRING, "", MENU_CLIENT_DATA, "", |
| 59 |
MENU_NOTIFY_PROC, print_client_data, 0 |
| 60 |
); |
| 61 |
|
| 62 |
empty_menu = menu_create( |
| 63 |
MENU_APPEND_ITEM, empty_menu_item, |
| 64 |
0); |
| 65 |
|
| 66 |
on_off_menu = menu_create( |
| 67 |
MENU_NOTIFY_PROC, menu_return_item, |
| 68 |
MENU_APPEND_ITEM, empty_menu_item, |
| 69 |
MENU_ITEM, MENU_STRING, "on", MENU_CLIENT_DATA, "on", MENU_ACTION_PROC, sp_printit, 0, |
| 70 |
MENU_ITEM, MENU_STRING, "off", MENU_CLIENT_DATA, "off", MENU_ACTION_PROC, sp_printit, 0, |
| 71 |
0); |
| 72 |
|
| 73 |
VARGROUP(var_files_menu) |
| 74 |
VARIBOOL("allow-bad-characters-in-filenames") |
| 75 |
#ifdef F_COMPLETION |
| 76 |
VARIABLE("bad-filename-extensions") |
| 77 |
VARIBOOL("display-filenames-with-bad-extensions") |
| 78 |
VARIBOOL("expand-environment-variables") |
| 79 |
#endif |
| 80 |
#ifndef MSDOS |
| 81 |
VARIABLE("file-creation-mode") |
| 82 |
#endif |
| 83 |
VARIBOOL("files-should-end-with-newline") |
| 84 |
#ifdef BACKUPFILES |
| 85 |
VARIBOOL("make-backup-files") |
| 86 |
#endif |
| 87 |
VARIABLE("tag-file") |
| 88 |
0); |
| 89 |
|
| 90 |
VARGROUP(var_modes_menu) |
| 91 |
VARIABLE("c-argument-indentation") |
| 92 |
VARIABLE("c-indentation-increment") |
| 93 |
VARIABLE("paren-flash-delay") |
| 94 |
0); |
| 95 |
|
| 96 |
VARGROUP(var_move_menu) |
| 97 |
VARIABLE("mark-threshold") |
| 98 |
VARIBOOL("scroll-all-lines") |
| 99 |
#ifdef HIGHLIGHTING |
| 100 |
VARIBOOL("scroll-bar") |
| 101 |
#endif |
| 102 |
VARIABLE("scroll-step") |
| 103 |
0); |
| 104 |
|
| 105 |
VARGROUP(var_search_menu) |
| 106 |
VARIBOOL("case-ignore-search") |
| 107 |
VARIBOOL("match-regular-expressions") |
| 108 |
VARIABLE("search-exit-char") |
| 109 |
VARIBOOL("wrap-search") |
| 110 |
0); |
| 111 |
|
| 112 |
VARGROUP(var_process_menu) |
| 113 |
#ifdef IPROCS |
| 114 |
VARIABLE("dbx-format-string") |
| 115 |
#endif |
| 116 |
#ifdef IPROCS |
| 117 |
VARIABLE("process-prompt") |
| 118 |
#endif |
| 119 |
#ifdef SUBSHELL |
| 120 |
VARIABLE("shell") |
| 121 |
VARIABLE("shell-flags") |
| 122 |
#endif |
| 123 |
VARIBOOL("send-typeout-to-buffer") |
| 124 |
#if defined(SUBSHELL) || defined(IPROCS) |
| 125 |
VARIBOOL("wrap-process-lines") |
| 126 |
#endif |
| 127 |
0); |
| 128 |
|
| 129 |
VARGROUP(var_compile_menu) |
| 130 |
VARIABLE("error-format-string") |
| 131 |
VARIABLE("error-window-size") |
| 132 |
#ifdef SUBSHELL |
| 133 |
VARIBOOL("write-files-on-make") |
| 134 |
#endif |
| 135 |
0); |
| 136 |
|
| 137 |
VARGROUP(var_format_menu) |
| 138 |
#ifdef CMT_FMT |
| 139 |
VARIABLE("comment-format") |
| 140 |
#endif |
| 141 |
VARIABLE("left-margin") |
| 142 |
VARIABLE("paragraph-delimiter-pattern") |
| 143 |
VARIABLE("right-margin") |
| 144 |
VARIBOOL("space-sentence-2") |
| 145 |
VARIABLE("tab-width") |
| 146 |
0); |
| 147 |
|
| 148 |
VARGROUP(var_abbrev_menu) |
| 149 |
#ifdef ABBREV |
| 150 |
VARIBOOL("auto-case-abbrev") |
| 151 |
#endif |
| 152 |
0); |
| 153 |
|
| 154 |
VARGROUP(var_misc_menu) |
| 155 |
VARIABLE("abort-char") |
| 156 |
#ifdef UNIX |
| 157 |
VARIBOOL("allow-^S-and-^Q") |
| 158 |
#endif /* UNIX */ |
| 159 |
#ifdef IBMPCDOS |
| 160 |
VARIBOOL("enhanced-keyboard") |
| 161 |
#endif |
| 162 |
#ifdef HIGHLIGHTING |
| 163 |
# ifdef IBMPCDOS |
| 164 |
VARIABLE("highlight-attribute") |
| 165 |
# endif |
| 166 |
VARIABLE("highlight-mark") |
| 167 |
#endif /* HIGHLIGHTING */ |
| 168 |
#ifdef UNIX |
| 169 |
VARIABLE("interrupt-character") |
| 170 |
#endif /* UNIX */ |
| 171 |
#if defined(USE_CTYPE) && !defined(NO_SETLOCALE) |
| 172 |
VARIABLE("lc-ctype") |
| 173 |
#endif |
| 174 |
#ifdef MAC |
| 175 |
VARIBOOL("macify") |
| 176 |
#endif |
| 177 |
#ifdef UNIX |
| 178 |
VARIABLE("mailbox") |
| 179 |
VARIABLE("mail-check-frequency") |
| 180 |
#endif /* UNIX */ |
| 181 |
VARIBOOL("meta-key") |
| 182 |
VARIABLE("mode-line") |
| 183 |
#ifdef IBMPCDOS |
| 184 |
VARIABLE("mode-line-attribute") |
| 185 |
#endif |
| 186 |
VARIBOOL("mode-line-should-standout") |
| 187 |
VARIBOOL("one-key-confirmation") |
| 188 |
#ifdef RECOVER |
| 189 |
VARIABLE("sync-frequency") |
| 190 |
#endif /* RECOVER */ |
| 191 |
#ifdef IBMPCDOS |
| 192 |
VARIABLE("text-attribute") |
| 193 |
#endif /* IBMPCDOS */ |
| 194 |
VARIABLE("tmp-file-pathname") |
| 195 |
#ifdef UNIX |
| 196 |
VARIABLE("update-time-frequency") |
| 197 |
#endif /* UNIX */ |
| 198 |
#ifdef ID_CHAR |
| 199 |
VARIBOOL("use-i/d-char") |
| 200 |
#endif |
| 201 |
VARIBOOL("visible-bell") |
| 202 |
0); |
| 203 |
|
| 204 |
variables_menu = menu_create( |
| 205 |
MENU_NOTIFY_PROC, print_client_data, |
| 206 |
MENU_APPEND_ITEM, empty_menu_item, |
| 207 |
GROUPNAME(var_files_menu, "Files") |
| 208 |
GROUPNAME(var_modes_menu, "Modes") |
| 209 |
GROUPNAME(var_move_menu, "Movement") |
| 210 |
GROUPNAME(var_search_menu, "Search/Replace") |
| 211 |
GROUPNAME(var_process_menu, "Processes/Shell") |
| 212 |
GROUPNAME(var_compile_menu, "Compiling") |
| 213 |
GROUPNAME(var_format_menu, "Formatting") |
| 214 |
#if defined(ABBREV) |
| 215 |
GROUPNAME(var_abbrev_menu, "Abbreviations") |
| 216 |
#endif |
| 217 |
GROUPNAME(var_misc_menu, "Miscellaneous") |
| 218 |
0); |
| 219 |
|
| 220 |
GROUP(help_menu) |
| 221 |
MENU_GEN_PROC, do_describing_proc, |
| 222 |
FUNCPULLPROC(" E ? describe-command", "describe-command", commands_proc) |
| 223 |
FUNCPULL(" describe-variable", "describe-variable", variables_menu) |
| 224 |
FUNCTION("^X ? describe-key", "describe-key") |
| 225 |
FUNCTION(" describe-bindings", "describe-bindings") |
| 226 |
FUNCTION(" apropos", "apropos") |
| 227 |
FUNCTION("Help keychart (mac)", "execute-macro keychart") |
| 228 |
0); |
| 229 |
|
| 230 |
GROUP(file_menu) |
| 231 |
FUNCTION(" append-region", "append-region") |
| 232 |
FUNCTION(" auto-execute-command", "auto-execute-command") |
| 233 |
FUNCTION(" auto-execute-macro", "auto-execute-macro") |
| 234 |
FUNCTION("F12 find-file", "find-file") |
| 235 |
FUNCTION("^X T find-tag", "find-tag") |
| 236 |
FUNCTION(" find-tag-at-point", "find-tag-at-point") |
| 237 |
FUNCTION("^X^I insert-file", "insert-file") |
| 238 |
FUNCTION("^X^S save-file", "save-file") |
| 239 |
FUNCTION("^X^V visit-file", "visit-file") |
| 240 |
FUNCTION("^X^W write-file", "write-file") |
| 241 |
FUNCTION("^X^M write-modified-files", "write-modified-files") |
| 242 |
FUNCTION(" write-region", "write-region") |
| 243 |
FUNCPULLPROC("VARS print", "print", var_files_proc) |
| 244 |
FUNCPULLPROC("VARS set", "set", var_files_proc) |
| 245 |
0); |
| 246 |
|
| 247 |
GROUP(mode_menu) |
| 248 |
#if defined(LISP) |
| 249 |
FUNCTION(" add-lisp-special", "add-lisp-special") |
| 250 |
#endif |
| 251 |
FUNCTION(" auto-fill-mode", "auto-fill-mode") |
| 252 |
FUNCTION(" auto-indent-mode", "auto-indent-mode") |
| 253 |
FUNCTION(" c-mode", "c-mode") |
| 254 |
FUNCTION(" fundamental-mode", "fundamental-mode") |
| 255 |
#if defined(LISP) |
| 256 |
FUNCTION(" lisp-mode", "lisp-mode") |
| 257 |
#endif |
| 258 |
FUNCTION("L1 over-write-mode", "over-write-mode") |
| 259 |
#if defined(IPROCS) |
| 260 |
FUNCTION(" dbx-mode", "dbx-mode") |
| 261 |
#endif |
| 262 |
FUNCTION(" read-only-mode", "read-only-mode") |
| 263 |
FUNCTION(" show-match-mode", "show-match-mode") |
| 264 |
FUNCTION(" text-mode", "text-mode") |
| 265 |
FUNCPULLPROC("VARS print", "print", var_modes_proc) |
| 266 |
FUNCPULLPROC("VARS set", "set", var_modes_proc) |
| 267 |
0); |
| 268 |
|
| 269 |
GROUP(move_menu) |
| 270 |
FUNCTION("<- backward-character", "backward-character") |
| 271 |
FUNCTION("R2 backward-list", "backward-list") |
| 272 |
FUNCTION(" backward-paragraph", "backward-paragraph") |
| 273 |
FUNCTION(" E^B backward-s-expression", "backward-s-expression") |
| 274 |
FUNCTION(" E A backward-sentence", "backward-sentence") |
| 275 |
FUNCTION(" E^U backward-up-list", "backward-up-list") |
| 276 |
FUNCTION("R6 backward-word", "backward-word") |
| 277 |
FUNCTION("R7 beginning-of-file", "beginning-of-file") |
| 278 |
FUNCTION("R1 beginning-of-line", "beginning-of-line") |
| 279 |
FUNCTION(" E , beginning-of-window", "beginning-of-window") |
| 280 |
FUNCTION(" E^D down-list", "down-list") |
| 281 |
FUNCTION("R13 end-of-file", "end-of-file") |
| 282 |
FUNCTION("R4 end-of-line", "end-of-line") |
| 283 |
FUNCTION(" E . end-of-window", "end-of-window") |
| 284 |
FUNCTION(" E M first-non-blank", "first-non-blank") |
| 285 |
FUNCTION("-> forward-character", "forward-character") |
| 286 |
FUNCTION("R5 forward-list", "forward-list") |
| 287 |
FUNCTION(" E ] forward-paragraph", "forward-paragraph") |
| 288 |
FUNCTION(" E^F forward-s-expression", "forward-s-expression") |
| 289 |
FUNCTION(" E E forward-sentence", "forward-sentence") |
| 290 |
FUNCTION("R6 forward-word", "forward-word") |
| 291 |
FUNCTION(" E G goto-line", "goto-line") |
| 292 |
FUNCTION("DOWN next-line", "next-line") |
| 293 |
FUNCTION("R15 next-page", "next-page") |
| 294 |
FUNCTION("UP previous-line", "previous-line") |
| 295 |
FUNCTION("R9 previous-page", "previous-page") |
| 296 |
FUNCTION("KP_- scroll-down", "scroll-down") |
| 297 |
FUNCTION(" scroll-left", "scroll-left") |
| 298 |
FUNCTION(" scroll-right", "scroll-right") |
| 299 |
FUNCTION("KP_+ scroll-up", "scroll-up") |
| 300 |
FUNCTION(" shift-region-left", "shift-region-left") |
| 301 |
FUNCTION(" shift-region-right", "shift-region-right") |
| 302 |
FUNCPULLPROC("VARS print", "print", var_move_proc) |
| 303 |
FUNCPULLPROC("VARS set", "set", var_move_proc) |
| 304 |
0); |
| 305 |
|
| 306 |
GROUP(bind_menu) |
| 307 |
FUNCTION(" bind-keymap-to-key", "bind-keymap-to-key") |
| 308 |
FUNCTION(" bind-macro-to-key", "bind-macro-to-key") |
| 309 |
#if defined(ABBREV) |
| 310 |
FUNCTION(" bind-macro-to-word-abbrev", "bind-macro-to-word-abbrev") |
| 311 |
#endif |
| 312 |
FUNCTION(" bind-to-key", "bind-to-key") |
| 313 |
FUNCTION(" local-bind-keymap-to-key", "local-bind-keymap-to-key") |
| 314 |
FUNCTION(" local-bind-macro-to-key", "local-bind-macro-to-key") |
| 315 |
FUNCTION(" local-bind-to-key", "local-bind-to-key") |
| 316 |
FUNCTION(" process-bind-keymap-to-key", "process-bind-keymap-to-key") |
| 317 |
FUNCTION(" process-bind-macro-to-key", "process-bind-macro-to-key") |
| 318 |
FUNCTION(" process-bind-to-key", "process-bind-to-key") |
| 319 |
0); |
| 320 |
|
| 321 |
GROUP(macro_menu) |
| 322 |
FUNCTION("^X ( begin-kbd-macro", "begin-kbd-macro") |
| 323 |
FUNCTION(" define-macro", "define-macro") |
| 324 |
FUNCTION("^X ) end-kbd-macro", "end-kbd-macro") |
| 325 |
FUNCTION("^X E execute-kbd-macro", "execute-kbd-macro") |
| 326 |
FUNCTION(" execute-macro", "execute-macro") |
| 327 |
FUNCTION(" E I make-macro-interactive", "make-macro-interactive") |
| 328 |
FUNCTION(" name-kbd-macro", "name-kbd-macro") |
| 329 |
FUNCTION(" start-remembering", "start-remembering") |
| 330 |
FUNCTION(" stop-remembering", "stop-remembering") |
| 331 |
FUNCTION(" write-macros-to-file", "write-macros-to-file") |
| 332 |
0); |
| 333 |
|
| 334 |
GROUP(buffer_menu) |
| 335 |
FUNCTION(" buffer-position", "buffer-position") |
| 336 |
FUNCTION("^X K delete-buffer", "delete-buffer") |
| 337 |
FUNCTION(" erase-buffer", "erase-buffer") |
| 338 |
FUNCTION(" kill-some-buffers", "kill-some-buffers") |
| 339 |
FUNCTION("F10 list-buffers", "list-buffers") |
| 340 |
FUNCTION(" make-buffer-unmodified", "make-buffer-unmodified") |
| 341 |
FUNCTION(" rename-buffer", "rename-buffer") |
| 342 |
FUNCTION("F11 select-buffer", "select-buffer") |
| 343 |
FUNCTION(" select-buffer-1", "select-buffer-1") |
| 344 |
FUNCTION(" select-buffer-2", "select-buffer-2") |
| 345 |
FUNCTION(" select-buffer-3", "select-buffer-3") |
| 346 |
FUNCTION(" select-buffer-4", "select-buffer-4") |
| 347 |
FUNCTION(" select-buffer-5", "select-buffer-5") |
| 348 |
FUNCTION(" select-buffer-6", "select-buffer-6") |
| 349 |
FUNCTION(" select-buffer-7", "select-buffer-7") |
| 350 |
FUNCTION(" select-buffer-8", "select-buffer-8") |
| 351 |
FUNCTION(" select-buffer-9", "select-buffer-9") |
| 352 |
FUNCTION(" select-buffer-10", "select-buffer-10") |
| 353 |
0); |
| 354 |
|
| 355 |
GROUP(window_menu) |
| 356 |
FUNCTION("F4 delete-other-windows", "delete-other-windows") |
| 357 |
FUNCTION("F5 delete-current-window", "delete-current-window") |
| 358 |
FUNCTION(" goto-window-with-buffer", "goto-window-with-buffer") |
| 359 |
FUNCTION("F6 grow-window", "grow-window") |
| 360 |
FUNCTION("F3 next-window", "next-window") |
| 361 |
FUNCTION(" number-lines-in-window", "number-lines-in-window") |
| 362 |
FUNCTION(" E^V page-next-window", "page-next-window") |
| 363 |
FUNCTION("^X P previous-window", "previous-window") |
| 364 |
FUNCTION(" shrink-window", "shrink-window") |
| 365 |
FUNCTION("F2 split-current-window", "split-current-window") |
| 366 |
FUNCTION(" visible-spaces-in-window", "visible-spaces-in-window") |
| 367 |
FUNCTION("^X 4 window-find", "window-find") |
| 368 |
0); |
| 369 |
|
| 370 |
GROUP(mark_menu) |
| 371 |
FUNCTION(" case-region-lower", "case-region-lower") |
| 372 |
FUNCTION(" case-region-upper", "case-region-upper") |
| 373 |
FUNCTION("L6 copy-region", "copy-region") |
| 374 |
FUNCTION("L4 exchange-point-and-mark", "exchange-point-and-mark") |
| 375 |
#if defined(SUBSHELL) |
| 376 |
FUNCTION(" filter-region", "filter-region") |
| 377 |
#endif |
| 378 |
FUNCTION("L10 kill-region", "kill-region") |
| 379 |
FUNCTION(" pop-mark", "pop-mark") |
| 380 |
FUNCTION(" replace-in-region", "replace-in-region") |
| 381 |
FUNCTION("L3 set-mark", "set-mark") |
| 382 |
FUNCTION("L8 yank", "yank") |
| 383 |
FUNCTION(" E Y yank-pop", "yank-pop") |
| 384 |
0); |
| 385 |
|
| 386 |
GROUP(edit_menu) |
| 387 |
FUNCTION(" case-character-capitalize", "case-character-capitalize") |
| 388 |
FUNCTION(" case-region-lower", "case-region-lower") |
| 389 |
FUNCTION(" case-region-upper", "case-region-upper") |
| 390 |
FUNCTION(" E C case-word-capitalize", "case-word-capitalize") |
| 391 |
FUNCTION(" E L case-word-lower", "case-word-lower") |
| 392 |
FUNCTION(" E U case-word-upper", "case-word-upper") |
| 393 |
FUNCTION(" character-to-octal-insert", "character-to-octal-insert") |
| 394 |
FUNCTION("^X^O delete-blank-lines", "delete-blank-lines") |
| 395 |
FUNCTION("KP_. kill-line (mac)", "execute-macro kill-line") |
| 396 |
FUNCTION(" ^D delete-next-character", "delete-next-character") |
| 397 |
FUNCTION("DEL delete-previous-character", "delete-previous-character") |
| 398 |
FUNCTION(" E \\ delete-white-space", "delete-white-space") |
| 399 |
FUNCTION(" E D kill-next-word", "kill-next-word") |
| 400 |
FUNCTION(" EDL kill-previous-word", "kill-previous-word") |
| 401 |
FUNCTION(" E^K kill-s-expression", "kill-s-expression") |
| 402 |
FUNCTION("^XDL kill-to-beginning-of-sentence", "kill-to-beginning-of-sentence") |
| 403 |
FUNCTION(" ^K kill-to-end-of-line", "kill-to-end-of-line") |
| 404 |
FUNCTION(" E K kill-to-end-of-sentence", "kill-to-end-of-sentence") |
| 405 |
FUNCTION("RET newline", "newline") |
| 406 |
FUNCTION("KP_0 newline-and-backup", "newline-and-backup") |
| 407 |
FUNCTION("LF newline-and-indent", "newline-and-indent") |
| 408 |
FUNCTION(" ^Q quoted-insert", "quoted-insert") |
| 409 |
FUNCTION(" ^T transpose-characters", "transpose-characters") |
| 410 |
FUNCTION("^X^T transpose-lines", "transpose-lines") |
| 411 |
0); |
| 412 |
|
| 413 |
GROUP(directory_menu) |
| 414 |
FUNCTION(" cd", "cd") |
| 415 |
FUNCTION(" dirs", "dirs") |
| 416 |
FUNCTION(" popd", "popd") |
| 417 |
FUNCTION(" pushd", "pushd") |
| 418 |
FUNCTION(" pushlibd", "pushlibd") |
| 419 |
FUNCTION(" pwd", "pwd") |
| 420 |
0); |
| 421 |
|
| 422 |
GROUP(compile_menu) |
| 423 |
#if defined(SUBSHELL) |
| 424 |
FUNCTION("^X^E compile-it", "compile-it") |
| 425 |
#endif |
| 426 |
FUNCTION(" current-error", "current-error") |
| 427 |
FUNCTION("^X^N next-error", "next-error") |
| 428 |
FUNCTION(" parse-errors", "parse-errors") |
| 429 |
#if defined(SPELL) |
| 430 |
FUNCTION(" parse-spelling-errors-in-buffer", "parse-spelling-errors-in-buffer") |
| 431 |
#endif |
| 432 |
FUNCTION("^X^P previous-error", "previous-error") |
| 433 |
#if defined(SPELL) |
| 434 |
FUNCTION("F7 spell-buffer", "spell-buffer") |
| 435 |
FUNCPULLPROC("VARS print", "print", var_compile_proc) |
| 436 |
FUNCPULLPROC("VARS set", "set", var_compile_proc) |
| 437 |
0); |
| 438 |
|
| 439 |
GROUP(format_menu) |
| 440 |
#if defined(CMT_FMT) |
| 441 |
FUNCTION("F8 fill-comment", "fill-comment") |
| 442 |
#endif /* CMT_FMT */ |
| 443 |
FUNCTION("F9 fill-paragraph", "fill-paragraph") |
| 444 |
FUNCTION(" fill-region", "fill-region") |
| 445 |
#if defined(LISP) |
| 446 |
FUNCTION(" grind-s-expr", "grind-s-expr") |
| 447 |
#endif |
| 448 |
FUNCTION("TAB handle-tab", "handle-tab") |
| 449 |
FUNCTION(" left-margin-here", "left-margin-here") |
| 450 |
FUNCTION(" right-margin-here", "right-margin-here") |
| 451 |
#endif |
| 452 |
FUNCPULLPROC("VARS print", "print", var_format_proc) |
| 453 |
FUNCPULLPROC("VARS set", "set", var_format_proc) |
| 454 |
0); |
| 455 |
|
| 456 |
GROUP(search_menu) |
| 457 |
FUNCTION(" i-search-forward", "i-search-forward") |
| 458 |
FUNCTION(" i-search-reverse", "i-search-reverse") |
| 459 |
FUNCTION(" E Q query-replace-string", "query-replace-string") |
| 460 |
FUNCTION(" replace-in-region", "replace-in-region") |
| 461 |
FUNCTION(" E R replace-string", "replace-string") |
| 462 |
FUNCTION("L9 search-forward", "search-forward") |
| 463 |
FUNCTION(" search-forward-nd", "search-forward-nd") |
| 464 |
FUNCTION("EL9 search-reverse", "search-reverse") |
| 465 |
FUNCTION(" search-reverse-nd", "search-reverse-nd") |
| 466 |
FUNCPULLPROC("VARS print", "print", var_search_proc) |
| 467 |
FUNCPULLPROC("VARS set", "set", var_search_proc) |
| 468 |
0); |
| 469 |
|
| 470 |
GROUP(process_menu) |
| 471 |
#if defined(PTYPROCS) |
| 472 |
FUNCTION(" continue-process", "continue-process") |
| 473 |
FUNCTION("^C^Y dstop-process", "dstop-process") |
| 474 |
FUNCTION("^C^D eof-process", "eof-process") |
| 475 |
#endif |
| 476 |
#if defined(IPROCS) |
| 477 |
FUNCTION(" i-shell-command", "i-shell-command") |
| 478 |
FUNCTION("^C^C interrupt-process", "interrupt-process") |
| 479 |
FUNCTION(" kill-process", "kill-process") |
| 480 |
FUNCTION(" list-processes", "list-processes") |
| 481 |
FUNCTION("CR process-newline", "process-newline") |
| 482 |
FUNCTION(" process-send-data-no-return", "process-send-data-no-return") |
| 483 |
#endif |
| 484 |
#if defined(SUBSHELL) |
| 485 |
FUNCTION(" push-shell", "push-shell") |
| 486 |
#endif |
| 487 |
#if defined(IPROCS) |
| 488 |
FUNCTION("^C^\\ quit-process", "quit-process") |
| 489 |
#endif |
| 490 |
#if defined(IPROCS) /* for GNU compatibility */ |
| 491 |
FUNCTION("Ent shell", "shell") |
| 492 |
#endif |
| 493 |
#if defined(SUBSHELL) |
| 494 |
FUNCTION("^X ! shell-command", "shell-command") |
| 495 |
FUNCTION(" shell-command-no-buffer", "shell-command-no-buffer") |
| 496 |
FUNCTION(" shell-command-to-buffer", "shell-command-to-buffer") |
| 497 |
FUNCTION(" shell-command-with-typeout", "shell-command-with-typeout") |
| 498 |
#endif |
| 499 |
#if defined(PTYPROCS) |
| 500 |
FUNCTION("^C^Z stop-process", "stop-process") |
| 501 |
#endif |
| 502 |
FUNCPULLPROC("VARS print", "print", var_process_proc) |
| 503 |
FUNCPULLPROC("VARS set", "set", var_process_proc) |
| 504 |
0); |
| 505 |
|
| 506 |
GROUP(abbrev_menu) |
| 507 |
#if defined(ABBREV) |
| 508 |
FUNCTION(" define-global-word-abbrev", "define-global-word-abbrev") |
| 509 |
FUNCTION(" define-mode-word-abbrev", "define-mode-word-abbrev") |
| 510 |
FUNCTION(" edit-word-abbrevs", "edit-word-abbrevs") |
| 511 |
FUNCTION(" read-word-abbrev-file", "read-word-abbrev-file") |
| 512 |
FUNCTION(" word-abbrev-mode", "word-abbrev-mode") |
| 513 |
FUNCTION(" write-word-abbrev-file", "write-word-abbrev-file") |
| 514 |
#endif |
| 515 |
0); |
| 516 |
|
| 517 |
GROUP(misc_menu) |
| 518 |
FUNCTION(" E^L clear-and-redraw", "clear-and-redraw") |
| 519 |
FUNCTION(" date", "date") |
| 520 |
FUNCTION(" execute-named-command", "execute-named-command") |
| 521 |
FUNCTION("^X^C exit-jove", "exit-jove") |
| 522 |
FUNCTION(" ^U gather-numeric-argument", "gather-numeric-argument") |
| 523 |
#if defined(JOB_CONTROL) |
| 524 |
FUNCTION(" E S pause-jove", "pause-jove") |
| 525 |
#else |
| 526 |
# ifndef MAC |
| 527 |
FUNCTION(" E S pause-jove", "pause-jove") |
| 528 |
# endif |
| 529 |
#endif |
| 530 |
FUNCTION(" recursive-edit", "recursive-edit") |
| 531 |
FUNCTION(" ^L redraw-display", "redraw-display") |
| 532 |
FUNCTION(" source", "source") |
| 533 |
FUNCTION(" string-length", "string-length") |
| 534 |
#if defined(JOB_CONTROL) |
| 535 |
FUNCTION(" suspend-jove", "suspend-jove") |
| 536 |
#endif |
| 537 |
FUNCTION(" version", "version") |
| 538 |
FUNCPULLPROC("VARS print", "print", var_misc_proc) |
| 539 |
FUNCPULLPROC("VARS set", "set", var_misc_proc) |
| 540 |
0); |
| 541 |
|
| 542 |
main_menu = menu_create( |
| 543 |
#ifndef SUNVIEW |
| 544 |
XV_FONT, font, /* not in SunView */ |
| 545 |
#endif |
| 546 |
MENU_NOTIFY_PROC, main_notify, |
| 547 |
GROUPNAME(help_menu, "Help") |
| 548 |
GROUPNAME(file_menu, "Files") |
| 549 |
GROUPNAME(directory_menu, "Directories") |
| 550 |
GROUPNAME(mode_menu, "Modes") |
| 551 |
GROUPNAME(move_menu, "Movement") |
| 552 |
GROUPNAME(edit_menu, "Editing") |
| 553 |
GROUPNAME(search_menu, "Search/Replace") |
| 554 |
GROUPNAME(buffer_menu, "Buffers") |
| 555 |
GROUPNAME(window_menu, "Windows") |
| 556 |
GROUPNAME(mark_menu, "Mark/Region") |
| 557 |
GROUPNAME(process_menu, "Processes/Shell") |
| 558 |
GROUPNAME(compile_menu, "Compiling/Spell") |
| 559 |
GROUPNAME(format_menu, "Formatting") |
| 560 |
GROUPNAME(macro_menu, "Macros") |
| 561 |
#if defined(ABBREV) |
| 562 |
GROUPNAME(abbrev_menu, "Abbreviations") |
| 563 |
#endif |
| 564 |
GROUPNAME(bind_menu, "Binding") |
| 565 |
GROUPNAME(misc_menu, "Miscellaneous") |
| 566 |
FUNCPULLPROC("VARS print", "print", var_variables_proc) |
| 567 |
FUNCPULLPROC("VARS set", "set", var_variables_proc) |
| 568 |
0); |
| 569 |
|
| 570 |
GROUP(another_help_menu) |
| 571 |
FUNCTION(" E ? describe-command", "describe-command") |
| 572 |
FUNCTION(" describe-variable", "describe-variable") |
| 573 |
FUNCTION("^X ? describe-key", "describe-key") |
| 574 |
FUNCTION(" describe-bindings", "describe-bindings") |
| 575 |
FUNCTION(" apropos", "apropos") |
| 576 |
0); |
| 577 |
|
| 578 |
commands_menu = menu_create( |
| 579 |
MENU_NOTIFY_PROC, sp_printit, |
| 580 |
MENU_APPEND_ITEM, empty_menu_item, |
| 581 |
GROUPNAME(another_help_menu, "Help") |
| 582 |
GROUPNAME(file_menu, "Files") |
| 583 |
GROUPNAME(directory_menu, "Directories") |
| 584 |
GROUPNAME(mode_menu, "Modes") |
| 585 |
GROUPNAME(move_menu, "Movement") |
| 586 |
GROUPNAME(edit_menu, "Editing") |
| 587 |
GROUPNAME(search_menu, "Search/Replace") |
| 588 |
GROUPNAME(buffer_menu, "Buffers") |
| 589 |
GROUPNAME(window_menu, "Windows") |
| 590 |
GROUPNAME(mark_menu, "Mark/Region") |
| 591 |
GROUPNAME(process_menu, "Processes/Shell") |
| 592 |
GROUPNAME(compile_menu, "Compiling/Spell") |
| 593 |
GROUPNAME(format_menu, "Formatting") |
| 594 |
GROUPNAME(macro_menu, "Macros") |
| 595 |
#if defined(ABBREV) |
| 596 |
GROUPNAME(abbrev_menu, "Abbreviations") |
| 597 |
#endif |
| 598 |
GROUPNAME(bind_menu, "Binding") |
| 599 |
GROUPNAME(misc_menu, "Miscellaneous") |
| 600 |
FUNCTION("VARS print", "print") |
| 601 |
FUNCTION("VARS set", "set") |
| 602 |
0); |
| 603 |
|
| 604 |
} |