home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume1 / 8711 / uemacs-3.9-doc / 3 < prev    next >
Internet Message Format  |  1990-07-13  |  33KB

  1. Path: uunet!husc6!necntc!ncoast!allbery
  2. From: nwd@j.cc.purdue.edu (Daniel Lawrence)
  3. Newsgroups: comp.sources.misc
  4. Subject: MicroEmacs 3.9 Documentation (3 of 4)
  5. Message-ID: <5705@ncoast.UUCP>
  6. Date: 19 Nov 87 00:17:58 GMT
  7. Sender: allbery@ncoast.UUCP
  8. Lines: 1257
  9. Approved: allbery@ncoast.UUCP
  10. X-Archive: comp.sources.misc/uemacs-3.9-doc/3
  11.  
  12. # This is a shar archive.
  13. # Remove everything above this line.
  14. # Run the file through sh, not csh.
  15. # (type `sh med.3')
  16. # If you do not see the message
  17. #    `med.3 completed!'
  18. # then the file was incomplete.
  19. echo extracting - findcom.cmd
  20. sed 's/^X//' > findcom.cmd << 'FRIDAY_NIGHT'
  21. X;    This hunts down mismatched comment problems in C
  22. X
  23. X;    start from the current position in the file
  24. X
  25. X    !force search-forward "/*"
  26. X    !if &seq $status FALSE
  27. X        !goto nend
  28. X    !endif
  29. X
  30. X*nxtopen
  31. X    ;record the position of the open comment
  32. X    update-screen
  33. X    set %oline $curline
  34. X    set %opos $curcol
  35. X
  36. X    ;find the first close comment
  37. X    !force search-forward "*/"
  38. X    !if &seq $status FALSE
  39. X        write-message "%%No close to this open comment"
  40. X        !return
  41. X    !endif
  42. X
  43. X    ;record the position of the close comment
  44. X    set %cline $curline
  45. X    set %cpos $curcol
  46. X
  47. X    ;go back to the open and find the next open
  48. X    set $curline %oline
  49. X    set $curcol %opos
  50. X
  51. X    ;and now find the next open
  52. X    !force search-forward "/*"
  53. X    !if &seq $status FALSE
  54. X        write-message "No errors"
  55. X        !return
  56. X    !endif
  57. X    set %nline $curline
  58. X    set %npos $curcol
  59. X
  60. X    ;compare the close to the next open
  61. X    !if &less %cline %nline
  62. X        !goto getnext
  63. X    !endif
  64. X    !if &and &equ %cline %nline &less %cpos %npos
  65. X        !goto getnext
  66. X    !endif
  67. X
  68. X    ;report a mismatch
  69. X    set $curline %oline
  70. X    set $curcol %opos
  71. X    write-message "%%This comment does not terminate properly"
  72. X    !return
  73. X
  74. X*getnext
  75. X    set $curline %nline
  76. X    set $curcol %npos
  77. X    !goto nxtopen 
  78. FRIDAY_NIGHT
  79. echo extracting - func.cmd
  80. sed 's/^X//' > func.cmd << 'FRIDAY_NIGHT'
  81. X;    FUNC.CMD    Allow mainframes to simulate function
  82. X;            keys with ^C<n> and ^C shifted-<n>
  83. X;            Also allow the ` key to be META as well as ESC
  84. X
  85. Xbind-to-key execute-macro-21 ^C
  86. X
  87. X21    store-macro
  88. X    !if ¬ $pending
  89. X        write-message "FN-"
  90. X    !endif
  91. X    set %rcchar >key
  92. X    set %rcchar &sindex "1234567890!@#$%^&*()" %rcchar
  93. X    !if &equ %rcchar 0
  94. X        write-message "[Not Bound]"
  95. X        !return
  96. X    !endif
  97. X    clear-message-line
  98. X    set %rcchar &mid ";<=>?@ABCDTUVWXYZ[\]" %rcchar 1
  99. X    &ind &bind &cat "FN" %rcchar
  100. X!endm
  101. FRIDAY_NIGHT
  102. echo extracting - me110.rc
  103. sed 's/^X//' > me110.rc << 'FRIDAY_NIGHT'
  104. X;    EMACS.RC:    Startup file for MicroEMACS 3.8 (HP 110) 
  105. X;
  106. X;            This file is executed everytime the
  107. X;            editor is entered
  108. X
  109. X;    ***** Rebind the Function key group
  110. X
  111. Xbind-to-key search-forward        FN;
  112. Xbind-to-key search-reverse        FN<
  113. Xbind-to-key next-window            FN=
  114. Xbind-to-key execute-macro        FN>
  115. Xbind-to-key find-file            FN?
  116. Xbind-to-key view-file            FN@
  117. Xbind-to-key save-file            FNA
  118. Xbind-to-key exit-emacs            FNB
  119. Xbind-to-key describe-key        FND
  120. Xbind-to-key meta-prefix            `
  121. Xbind-to-key beginning-of-file        FNs
  122. Xbind-to-key end-of-file            FNt
  123. X
  124. X;    Enter Help
  125. X1 store-macro
  126. X    delete-other-windows
  127. X    help
  128. X    8 resize-window
  129. X    bind-to-key execute-macro-12 FNH
  130. X    bind-to-key execute-macro-13 FNP
  131. X    bind-to-key execute-macro-11 FNT
  132. X    beginning-of-file
  133. X    2 forward-character
  134. X    clear-message-line
  135. X!endm
  136. X
  137. X;    consult file
  138. X2 store-macro
  139. X    2 split-current-window
  140. X    previous-window
  141. X    view-file @"File to Consult: "
  142. X    8 resize-window
  143. X    next-window
  144. X!endm
  145. X
  146. X;    Exit Help
  147. X11 store-macro
  148. X    bind-to-key previous-line FNH
  149. X    bind-to-key next-line FNP
  150. X    bind-to-key execute-macro-1 FNT
  151. X    delete-window
  152. X    clear-message-line
  153. X!endm
  154. X
  155. X;    last help page
  156. X12 store-macro
  157. X    beginning-of-line
  158. X    search-reverse "=>"
  159. X    1 redraw-display
  160. X!endm
  161. X
  162. X;    next help page
  163. X13 store-macro
  164. X    beginning-of-line
  165. X    2 forward-character
  166. X    search-forward "=>"
  167. X    1 redraw-display
  168. X!endm
  169. X
  170. X;    bring up the function key window
  171. X
  172. X    2 split-current-window
  173. X    select-buffer "Function Keys"
  174. X    2 resize-window
  175. X    insert-string " F1 search     | F2 search back | F3 next wind   | F4 Exec Macro  | MENU Help"
  176. X    newline
  177. X    insert-string "SYS desc key   | F5 Find file   | F6 view file   | F7 save file   | F8 exit"
  178. X    beginning-of-file
  179. X    unmark-buffer
  180. X    next-window
  181. FRIDAY_NIGHT
  182. echo extracting - me150.rc
  183. sed 's/^X//' > me150.rc << 'FRIDAY_NIGHT'
  184. X;    EMACS.RC:    Startup file for MicroEMACS 3.4
  185. X;
  186. X;            This file is executed everytime the
  187. X;            editor is entered
  188. X
  189. X;    ***** Rebind the Function key group
  190. X
  191. Xbind-to-key hunt-forward        FN^@
  192. X1 label-function-key "hunt     forward"
  193. Xbind-to-key hunt-backward        FN^A
  194. X2 label-function-key "hunt    backward"
  195. Xbind-to-key next-window            FN^B
  196. X3 label-function-key "next      window"
  197. Xbind-to-key execute-macro        FN^C
  198. X4 label-function-key "exec       macro"
  199. Xbind-to-key find-file            FN^D
  200. X5 label-function-key "find       file"
  201. Xbind-to-key view-file            FN^E
  202. X6 label-function-key "view       file"
  203. Xbind-to-key save-file            FN^F
  204. X7 label-function-key "save       file"
  205. Xbind-to-key exit-emacs            FN^G
  206. X8 label-function-key "exit      emacs"
  207. X
  208. X;    Enter Help
  209. X1 store-macro
  210. X    help
  211. X    8 resize-window
  212. X    bind-to-key execute-macro-12 FNI
  213. X    bind-to-key execute-macro-13 FNQ
  214. X    bind-to-key execute-macro-11 FNT
  215. X    add-mode "red"
  216. X    begining-of-file
  217. X    2 forward-character
  218. X    clear-message-line
  219. X!endm
  220. X
  221. X;    consult file
  222. X2 store-macro
  223. X    2 split-current-window
  224. X    previous-window
  225. X    view-file "@File to Consult: "
  226. X    8 resize-window
  227. X    add-mode "green"
  228. X    add-mode "Black"
  229. X    next-window
  230. X!endm
  231. X
  232. X;    Exit Help
  233. X11 store-macro
  234. X    bind-to-key previous-page FNI
  235. X    bind-to-key next-page FNQ
  236. X    bind-to-key execute-macro-1 FNT
  237. X    delete-window
  238. X    clear-message-line
  239. X!endm
  240. X
  241. X;    last help page
  242. X12 store-macro
  243. X    begining-of-line
  244. X    search-reverse "=>"
  245. X    1 redraw-display
  246. X!endm
  247. X
  248. X;    next help page
  249. X13 store-macro
  250. X    begining-of-line
  251. X    2 forward-character
  252. X    search-forward "=>"
  253. X    1 redraw-display
  254. X!endm
  255. X
  256. X
  257. FRIDAY_NIGHT
  258. echo extracting - menu.cmd
  259. sed 's/^X//' > menu.cmd << 'FRIDAY_NIGHT'
  260. X;    MENU.CMD:    Menu learning system for MicroEMACS 3.7
  261. X;
  262. X;            This file is executed to activate MicroEMACS's
  263. X;            menu interface code
  264. X
  265. X;    setup windows for use
  266. X
  267. X    add-global-mode "blue"
  268. X    1 split-current-window
  269. X    5 resize-window
  270. X    add-mode "red"
  271. X    view-file "menu1"
  272. X    name-buffer "menu window"
  273. X    change-file-name ""
  274. X    add-mode "view"
  275. X    next-window
  276. X
  277. X;    Load menu routines as needed
  278. X
  279. X;    Activate Main Menu
  280. X
  281. X1    store-macro
  282. X    save-window
  283. X    1 next-window
  284. X    beginning-of-file
  285. X    search-forward "<<01"
  286. X    next-line
  287. X    1 redraw-display
  288. X    restore-window
  289. X    update-screen
  290. X
  291. X;    ***** Rebind the Function key group
  292. X
  293. X    bind-to-key execute-macro-3    FN;
  294. X    bind-to-key execute-macro-4    FN<
  295. X    bind-to-key execute-macro-5    FN=
  296. X    bind-to-key execute-macro-6    FN>
  297. X    bind-to-key execute-macro-7    FN?
  298. X    bind-to-key execute-macro-8    FN@
  299. X    bind-to-key execute-macro-9    FNA
  300. X    bind-to-key execute-macro-2    FNB
  301. X    bind-to-key execute-macro-10    FNC
  302. X    bind-to-key exit-emacs        FND
  303. X    clear-message-line
  304. X!endm
  305. X
  306. X;    and bring that menu up
  307. X
  308. X    execute-macro-1
  309. X    write-message "         [loading MENU system]"
  310. X
  311. X;    set up the editor control menu
  312. X
  313. X2    store-macro
  314. X    save-window
  315. X    1 next-window
  316. X    beginning-of-file
  317. X    search-forward "<<02"
  318. X    next-line
  319. X    1 redraw-display
  320. X    restore-window
  321. X    update-screen
  322. X
  323. X;    ***** Rebind the Function key group
  324. X
  325. X    bind-to-key execute-macro-11    FN;
  326. X    bind-to-key execute-macro-12    FN<
  327. X    bind-to-key execute-macro-13    FN=
  328. X    bind-to-key execute-macro-14    FN>
  329. X    bind-to-key execute-macro-15    FN?
  330. X    bind-to-key execute-macro-16    FN@
  331. X    bind-to-key execute-macro-17    FNA
  332. X    bind-to-key execute-macro-18    FNB
  333. X    bind-to-key execute-macro-19    FNC
  334. X    bind-to-key execute-macro-1    FND
  335. X    clear-message-line
  336. X!endm
  337. X
  338. X;    Activate word case/screen control Menu
  339. X
  340. X3    store-macro
  341. X    save-window
  342. X    1 next-window
  343. X    beginning-of-file
  344. X    search-forward "<<03"
  345. X    next-line
  346. X    1 redraw-display
  347. X    restore-window
  348. X    update-screen
  349. X
  350. X;    ***** Rebind the Function key group
  351. X
  352. X    bind-to-key case-word-upper    FN;
  353. X    bind-to-key case-region-upper    FN<
  354. X    bind-to-key case-word-lower    FN=
  355. X    bind-to-key case-region-lower    FN>
  356. X    bind-to-key case-word-capitalize FN?
  357. X    unbind-key FN@
  358. X    bind-to-key clear-and-redraw    FNA
  359. X    bind-to-key set-mark        FNB
  360. X    bind-to-key redraw-display    FNC
  361. X    bind-to-key execute-macro-1    FND
  362. X    clear-message-line
  363. X!endm
  364. X
  365. X;    Activate paging/scrolling Menu
  366. X
  367. X4    store-macro
  368. X    save-window
  369. X    1 next-window
  370. X    beginning-of-file
  371. X    search-forward "<<08"
  372. X    next-line
  373. X    1 redraw-display
  374. X    restore-window
  375. X    update-screen
  376. X
  377. X;    ***** Rebind the Function key group
  378. X
  379. X    bind-to-key previous-page    FN;
  380. X    bind-to-key next-page        FN<
  381. X    bind-to-key move-window-down    FN=
  382. X    bind-to-key move-window-up    FN>
  383. X    bind-to-key scroll-next-up    FN?
  384. X    unbind-key             FN@
  385. X    bind-to-key scroll-next-down    FNA
  386. X    unbind-key             FNB
  387. X    bind-to-key exchange-point-and-mark FNC
  388. X    bind-to-key execute-macro-1    FND
  389. X    clear-message-line
  390. X!endm
  391. X
  392. X;    Activate cut & paste Menu
  393. X
  394. X5    store-macro
  395. X    save-window
  396. X    1 next-window
  397. X    beginning-of-file
  398. X    search-forward "<<04"
  399. X    next-line
  400. X    1 redraw-display
  401. X    restore-window
  402. X    update-screen
  403. X
  404. X;    ***** Rebind the Function key group
  405. X
  406. X    bind-to-key set-mark        FN;
  407. X    unbind-key FN<
  408. X    bind-to-key kill-region        FN=
  409. X    unbind-key FN>
  410. X    bind-to-key copy-region        FN?
  411. X    unbind-key FN@
  412. X    bind-to-key yank        FNA
  413. X    unbind-key FNB
  414. X    unbind-key FNC
  415. X    bind-to-key execute-macro-1    FND
  416. X    clear-message-line
  417. X!endm
  418. X
  419. X;    Activate Search & replace Menu
  420. X
  421. X6    store-macro
  422. X    save-window
  423. X    1 next-window
  424. X    beginning-of-file
  425. X    search-forward "<<09"
  426. X    next-line
  427. X    1 redraw-display
  428. X    restore-window
  429. X    update-screen
  430. X
  431. X;    ***** Rebind the Function key group
  432. X
  433. X    bind-to-key search-forward    FN;
  434. X    bind-to-key search-reverse    FN<
  435. X    bind-to-key hunt-forward    FN=
  436. X    bind-to-key hunt-backward    FN>
  437. X    bind-to-key incremental-search    FN?
  438. X    bind-to-key reverse-incremental-search FN@
  439. X    bind-to-key replace-string    FNA
  440. X    bind-to-key query-replace-string FNB
  441. X    unbind-key FNC
  442. X    bind-to-key execute-macro-1    FND
  443. X    clear-message-line
  444. X!endm
  445. X
  446. X;    Activate Deletion Menu
  447. X
  448. X7    store-macro
  449. X    save-window
  450. X    1 next-window
  451. X    beginning-of-file
  452. X    search-forward "<<05"
  453. X    next-line
  454. X    1 redraw-display
  455. X    restore-window
  456. X    update-screen
  457. X
  458. X;    ***** Rebind the Function key group
  459. X
  460. X    bind-to-key delete-previous-character FN;
  461. X    unbind-key FN<
  462. X    bind-to-key delete-next-character FN=
  463. X    unbind-key FN>
  464. X    bind-to-key kill-to-end-of-line    FN?
  465. X    unbind-key FN@
  466. X    bind-to-key delete-blank-lines    FNA
  467. X    unbind-key FNB
  468. X    unbind-key FNC
  469. X    bind-to-key execute-macro-1    FND
  470. X    clear-message-line
  471. X!endm
  472. X
  473. X;    Activate Word procesing Menu
  474. X
  475. X8    store-macro
  476. X    save-window
  477. X    1 next-window
  478. X    beginning-of-file
  479. X    search-forward "<<10"
  480. X    next-line
  481. X    1 redraw-display
  482. X    restore-window
  483. X    update-screen
  484. X
  485. X;    ***** Rebind the Function key group
  486. X
  487. X    bind-to-key previous-word    FN;
  488. X    bind-to-key next-word        FN<
  489. X    bind-to-key previous-paragraph    FN=
  490. X    bind-to-key next-paragraph    FN>
  491. X    bind-to-key fill-paragraph    FN?
  492. X    bind-to-key kill-paragraph    FN@
  493. X    bind-to-key delete-previous-word FNA
  494. X    bind-to-key delete-next-word    FNB
  495. X    bind-to-key count-words        FNC
  496. X    bind-to-key execute-macro-1    FND
  497. X    clear-message-line
  498. X!endm
  499. X
  500. X;    Activate Insertion Menu
  501. X
  502. X9    store-macro
  503. X    save-window
  504. X    1 next-window
  505. X    beginning-of-file
  506. X    search-forward "<<06"
  507. X    next-line
  508. X    1 redraw-display
  509. X    restore-window
  510. X    update-screen
  511. X
  512. X;    ***** Rebind the Function key group
  513. X
  514. X    bind-to-key open-line        FN;
  515. X    bind-to-key insert-string    FN<
  516. X    bind-to-key handle-tab        FN=
  517. X    bind-to-key quote-character    FN>
  518. X    bind-to-key insert-space    FN?
  519. X    bind-to-key transpose-characters FN@
  520. X    bind-to-key newline-and-indent    FNA
  521. X    unbind-key FNB
  522. X    bind-to-key newline        FNC
  523. X    bind-to-key execute-macro-1    FND
  524. X    clear-message-line
  525. X!endm
  526. X
  527. X;    Activate Cursor movement Menu
  528. X
  529. X10    store-macro
  530. X    save-window
  531. X    1 next-window
  532. X    beginning-of-file
  533. X    search-forward "<<07"
  534. X    next-line
  535. X    1 redraw-display
  536. X    restore-window
  537. X    update-screen
  538. X
  539. X;    ***** Rebind the Function key group
  540. X
  541. X    bind-to-key beginning-of-file    FN;
  542. X    bind-to-key previous-line    FN<
  543. X    bind-to-key backward-character    FN=
  544. X    bind-to-key forward-character    FN>
  545. X    bind-to-key end-of-file        FN?
  546. X    bind-to-key next-line        FN@
  547. X    bind-to-key beginning-of-line    FNA
  548. X    bind-to-key end-of-line        FNB
  549. X    bind-to-key execute-macro-21    FNC
  550. X    bind-to-key execute-macro-1    FND
  551. X    clear-message-line
  552. X!endm
  553. X
  554. X21    store-macro
  555. X    @"Line number to go to: " goto-line
  556. X!endm
  557. X
  558. X;    Activate Buffer Menu
  559. X
  560. X11    store-macro
  561. X    save-window
  562. X    1 next-window
  563. X    beginning-of-file
  564. X    search-forward "<<11"
  565. X    next-line
  566. X    1 redraw-display
  567. X    restore-window
  568. X    update-screen
  569. X
  570. X;    ***** Rebind the Function key group
  571. X
  572. X    bind-to-key buffer-position    FN;
  573. X    bind-to-key unmark-buffer    FN<
  574. X    bind-to-key delete-buffer    FN=
  575. X    bind-to-key next-buffer        FN>
  576. X    bind-to-key list-buffers    FN?
  577. X    bind-to-key execute-macro-22    FN@
  578. X    bind-to-key name-buffer        FNA
  579. X    unbind-key FNB
  580. X    bind-to-key select-buffer    FNC
  581. X    bind-to-key execute-macro-2    FND
  582. X    clear-message-line
  583. X!endm
  584. X
  585. X22    store-macro
  586. X    filter-buffer @"Name of DOS filter: "
  587. X!endm
  588. X;    Macro Menu
  589. X
  590. X12    store-macro
  591. X    save-window
  592. X    1 next-window
  593. X    beginning-of-file
  594. X    search-forward "<<11"
  595. X    next-line
  596. X    1 redraw-display
  597. X    restore-window
  598. X    update-screen
  599. X
  600. X;    ***** Rebind the Function key group
  601. X
  602. X    bind-to-key begin-macro        FN;
  603. X    unbind-key FN<
  604. X    bind-to-key end-macro        FN=
  605. X    unbind-key FN>
  606. X    bind-to-key execute-macro    FN?
  607. X    unbind-key FN@
  608. X    unbind-key FNA
  609. X    unbind-key FNB
  610. X    unbind-key FNC
  611. X    bind-to-key execute-macro-2    FND
  612. X    clear-message-line
  613. X!endm
  614. X
  615. X;    Color change Menu
  616. X
  617. X13    store-macro
  618. X    save-window
  619. X    1 next-window
  620. X    beginning-of-file
  621. X    search-forward "<<12"
  622. X    next-line
  623. X    1 redraw-display
  624. X    restore-window
  625. X    update-screen
  626. X
  627. X;    ***** Rebind the Function key group
  628. X
  629. X    bind-to-key execute-macro-23    FN;
  630. X    unbind-key FN<
  631. X    bind-to-key execute-macro-24    FN=
  632. X    unbind-key FN>
  633. X    bind-to-key execute-macro-25    FN?
  634. X    unbind-key FN@
  635. X    bind-to-key execute-macro-26    FNA
  636. X    unbind-key FNB
  637. X    unbind-key FNC
  638. X    bind-to-key execute-macro-2    FND
  639. X    clear-message-line
  640. X!endm
  641. X
  642. X;    Set forground color
  643. X
  644. X23    store-macro
  645. X    save-window
  646. X    1 next-window
  647. X    select-buffer "[color]"
  648. X    beginning-of-file
  649. X    insert-string @"Color to change to: "
  650. X    newline
  651. X    beginning-of-file
  652. X    case-word-upper
  653. X    beginning-of-file
  654. X    unmark-buffer
  655. X    select-buffer "menu window"
  656. X    1 redraw-display
  657. X    restore-window
  658. X    add-mode #"[color]"
  659. X    delete-buffer "[color]"
  660. X!endm
  661. X
  662. X;    Set background color
  663. X
  664. X24    store-macro
  665. X    save-window
  666. X    1 next-window
  667. X    select-buffer "[color]"
  668. X    beginning-of-file
  669. X    insert-string @"Color to change to: "
  670. X    newline
  671. X    beginning-of-file
  672. X    case-word-lower
  673. X    beginning-of-file
  674. X    unmark-buffer
  675. X    select-buffer "menu window"
  676. X    1 redraw-display
  677. X    restore-window
  678. X    add-mode #"[color]"
  679. X    delete-buffer "[color]"
  680. X!endm
  681. X
  682. X;    Set global forground color
  683. X
  684. X25    store-macro
  685. X    save-window
  686. X    1 next-window
  687. X    select-buffer "[color]"
  688. X    beginning-of-file
  689. X    insert-string @"Color to change to: "
  690. X    newline
  691. X    beginning-of-file
  692. X    case-word-upper
  693. X    beginning-of-file
  694. X    unmark-buffer
  695. X    select-buffer "menu window"
  696. X    1 redraw-display
  697. X    restore-window
  698. X    add-global-mode #"[color]"
  699. X    delete-buffer "[color]"
  700. X!endm
  701. X
  702. X;    Set global background color
  703. X
  704. X26    store-macro
  705. X    save-window
  706. X    1 next-window
  707. X    select-buffer "[color]"
  708. X    beginning-of-file
  709. X    insert-string @"Color to change to: "
  710. X    newline
  711. X    beginning-of-file
  712. X    case-word-lower
  713. X    beginning-of-file
  714. X    unmark-buffer
  715. X    select-buffer "menu window"
  716. X    1 redraw-display
  717. X    restore-window
  718. X    add-global-mode #"[color]"
  719. X    delete-buffer "[color]"
  720. X!endm
  721. X
  722. X;    set Mode Menu
  723. X
  724. X14    store-macro
  725. X    save-window
  726. X    1 next-window
  727. X    beginning-of-file
  728. X    search-forward "<<17"
  729. X    next-line
  730. X    1 redraw-display
  731. X    restore-window
  732. X    update-screen
  733. X
  734. X;    ***** Rebind the Function key group
  735. X
  736. X    bind-to-key add-mode        FN;
  737. X    bind-to-key add-global-mode    FN<
  738. X    bind-to-key delete-mode        FN=
  739. X    bind-to-key delete-global-mode    FN>
  740. X    unbind-key FN?
  741. X    bind-to-key execute-macro-27    FN@
  742. X    unbind-key FNA
  743. X    unbind-key FNB
  744. X    bind-to-key select-buffer    FNC
  745. X    bind-to-key execute-macro-2    FND
  746. X    clear-message-line
  747. X!endm
  748. X
  749. X27    store-macro
  750. X    @"Column to fill to: " set-fill-column
  751. X!endm
  752. X
  753. X;    DOS command Menu
  754. X
  755. X15    store-macro
  756. X    save-window
  757. X    1 next-window
  758. X    beginning-of-file
  759. X    search-forward "<<13"
  760. X    next-line
  761. X    1 redraw-display
  762. X    restore-window
  763. X    update-screen
  764. X
  765. X;    ***** Rebind the Function key group
  766. X
  767. X    bind-to-key shell-command    FN;
  768. X    unbind-key FN<
  769. X    bind-to-key pipe-command    FN=
  770. X    unbind-key FN>
  771. X    bind-to-key i-shell        FN?
  772. X    unbind-key FN@
  773. X    bind-to-key quick-exit        FNA
  774. X    unbind-key FNB
  775. X    bind-to-key exit-emacs        FNC
  776. X    bind-to-key execute-macro-2    FND
  777. X    clear-message-line
  778. X!endm
  779. X
  780. X;    Script Menu
  781. X
  782. X16    store-macro
  783. X    save-window
  784. X    1 next-window
  785. X    beginning-of-file
  786. X    search-forward "<<18"
  787. X    next-line
  788. X    1 redraw-display
  789. X    restore-window
  790. X    update-screen
  791. X
  792. X;    ***** Rebind the Function key group
  793. X
  794. X    bind-to-key execute-file    FN;
  795. X    bind-to-key execute-command-line FN<
  796. X    bind-to-key execute-buffer    FN=
  797. X    bind-to-key execute-named-command FN>
  798. X    unbind-key FN?
  799. X    unbind-key FN@
  800. X    unbind-key FNA
  801. X    unbind-key FNB
  802. X    unbind-key FNC
  803. X    bind-to-key execute-macro-2    FND
  804. X    clear-message-line
  805. X!endm
  806. X
  807. X;    File access Menu
  808. X
  809. X17    store-macro
  810. X    save-window
  811. X    1 next-window
  812. X    beginning-of-file
  813. X    search-forward "<<14"
  814. X    next-line
  815. X    1 redraw-display
  816. X    restore-window
  817. X    update-screen
  818. X
  819. X;    ***** Rebind the Function key group
  820. X
  821. X    bind-to-key find-file        FN;
  822. X    bind-to-key save-file        FN<
  823. X    bind-to-key view-file        FN=
  824. X    bind-to-key write-file        FN>
  825. X    bind-to-key read-file        FN?
  826. X    bind-to-key change-file-name    FN@
  827. X    bind-to-key insert-file        FNA
  828. X    unbind-key FNB
  829. X    unbind-key FNC
  830. X    bind-to-key execute-macro-2    FND
  831. X    clear-message-line
  832. X!endm
  833. X
  834. X;    Window Menu
  835. X
  836. X18    store-macro
  837. X    save-window
  838. X    1 next-window
  839. X    beginning-of-file
  840. X    search-forward "<<19"
  841. X    next-line
  842. X    1 redraw-display
  843. X    restore-window
  844. X    update-screen
  845. X
  846. X;    ***** Rebind the Function key group
  847. X
  848. X    bind-to-key split-current-window FN;
  849. X    bind-to-key delete-other-windows FN<
  850. X    bind-to-key resize-window    FN=
  851. X    bind-to-key delete-window    FN>
  852. X    bind-to-key shrink-window    FN?
  853. X    bind-to-key grow-window        FN@
  854. X    bind-to-key next-window        FNA
  855. X    bind-to-key previous-window    FNB
  856. X    unbind-key FNC
  857. X    bind-to-key execute-macro-2    FND
  858. X    clear-message-line
  859. X!endm
  860. X
  861. X;    key binding Menu
  862. X
  863. X19    store-macro
  864. X    save-window
  865. X    1 next-window
  866. X    beginning-of-file
  867. X    search-forward "<<15"
  868. X    next-line
  869. X    1 redraw-display
  870. X    restore-window
  871. X    update-screen
  872. X
  873. X;    ***** Rebind the Function key group
  874. X
  875. X    bind-to-key bind-to-key        FN;
  876. X    unbind-key FN<
  877. X    bind-to-key unbind-key        FN=
  878. X    unbind-key FN>
  879. X    bind-to-key describe-key    FN?
  880. X    unbind-key FN@
  881. X    bind-to-key describe-bindings    FNA
  882. X    unbind-key FNB
  883. X    unbind-key FNC
  884. X    bind-to-key execute-macro-2    FND
  885. X    clear-message-line
  886. X!endm
  887. X
  888. X    clear-message-line
  889. FRIDAY_NIGHT
  890. echo extracting - menu1
  891. sed 's/^X//' > menu1 << 'FRIDAY_NIGHT'
  892. X--<<01>>-----------------------------------------------------------------------
  893. XMicroEMACS 3.7      F1 WORD CASE/SCREEN CONTROL   F2  PAGING/SCROLLING
  894. X[Main Menu]         F3 CUT & PASTE                F4  SEARCH AND REPLACE
  895. X                    F5 DELETION COMMANDS          F6  WORD PROCESSING
  896. X                    F7 INSERTION COMMANDS         F8  EDITOR CONTROL
  897. X 06/18/86           F9 CURSOR MOVEMENT            F10 exit MicroEMACS
  898. X--<<02>>-----------------------------------------------------------------------
  899. XMicroEMACS 3.7      F1 BUFFER CONTROL             F2  MACROS
  900. X[Editor control]    F3 COLOR CHANGES              F4  MODES
  901. X                    F5 DOS COMMANDS               F6  SCRIPTS
  902. X                    F7 FILE ACCESS                F8  WINDOWS
  903. X                    F9 KEY BINDINGS               F10 exit to MAIN MENU
  904. X--<<03>>-----------------------------------------------------------------------
  905. XMicroEMACS 3.7      F1 upper case a word          F2  upper case a region
  906. X Word case &        F3 lower case a word          F4  lower case a region
  907. X  Screen control    F5 capitilize a word
  908. X                    F7 redraw the screen          F8  mark a region
  909. X                    F9 center the current line    F10 exit to MAIN MENU
  910. X--<<04>>-----------------------------------------------------------------------
  911. XMicroEMACS 3.7      F1  mark a region
  912. X  Cut & Paste       F3  delete the region
  913. X                    F5  copy the region to the kill buffer
  914. X                    F7  insert the kill buffer into the text here
  915. X                                                  F10 exit to MAIN MENU
  916. X--<<05>>-----------------------------------------------------------------------
  917. XMicroEMACS 3.7      F1 delete the last character
  918. X  Deletions         F3 delete the next character
  919. X                    F5 delete to the end of the current line
  920. X                    F7 delete all the blank lines around the cursor
  921. X                                                  F10 exit to MAIN MENU
  922. X--<<06>>-----------------------------------------------------------------------
  923. XMicroEMACS 3.7      F1 open a blank line          F2  insert a prompted string
  924. X  Insertion         F3 insert a tab               F4  quote the next character
  925. X                    F5 insert a space             F6  transpose last 2 chars
  926. X                    F7 insert a newline and indent like the last line
  927. X                    F9 insert a newline           F10 exit to MAIN MENU
  928. X--<<07>>-----------------------------------------------------------------------
  929. XMicroEMACS 3.7      F1 begining of the file       F2  up one line
  930. X  Cursor Movement   F3 left                       F4  right
  931. X        F^2         F5 end of the file            F6  down one line
  932. X    F3 < + > F4     F7 begining of line           F8  end of line
  933. X        FV6         F9 goto line                  F10 exit to MAIN MENU
  934. X--<<08>>-----------------------------------------------------------------------
  935. XMicroEMACS 3.7      F1  go up one page            F2  go down one page
  936. X  Paging and        F3  scroll the screen up      F4  scroll the screen down
  937. X     Scrolling      F5  make the next widow go up one page
  938. X                    F7  make the next window go down one page
  939. X                    F9  exchange cursor & mark    F10 exit to MAIN MENU
  940. X--<<09>>-----------------------------------------------------------------------
  941. XMicroEMACS 3.7      f1  search forward            f2  seach backwards
  942. X  Search and        F3  hunt forward              f4  hunt backwards
  943. X    Replace         F5  isearch forward           F6  isearch backward
  944. X                    F7  replace string            F8  replace string w/query
  945. X                                                  F10 exit to MAIN MENU
  946. X--<<10>>-----------------------------------------------------------------------
  947. XMicroEMACS 3.7      F1 go back a word             F2  go forward a word
  948. X  Word processing   F3 go back a paragraph        F4  go forward a paragraph
  949. X                    F5 fill paragraph             F6  delete current paragraph
  950. X                    F7 delete last word           F8  delete next word
  951. X                    F9 count words in region      F10 exit to MAIN MENU
  952. X--<<11>>-----------------------------------------------------------------------
  953. XMicroEMACS 3.7      F1 report position            F2  unmark buffer
  954. X  Buffer Control    F3 delete buffer              F4  switch to next buffer
  955. X                    F5 list all buffers           F6  filter buffer through
  956. X                    F7 rename current buffer             DOS program
  957. X                    F9 select buffer              F10 exit to CONTROL MENU
  958. X--<<12>>-----------------------------------------------------------------------
  959. XMicroEMACS 3.7      Colors:           |  F1 current window's forground color
  960. X  Color changes       Black   Magenta |  F3 current window's background color
  961. X                      Blue    Cyan    |  F5 global forground color
  962. X                      Red     Yellow  |  F7 global background color
  963. X                      Green   White   |           F10  exit to CONTROL MENU
  964. X--<<13>>-----------------------------------------------------------------------
  965. XMicroEMACS 3.7      F1  execute one DOS command
  966. X  DOS commands      F3  pipe one DOS command to a buffer
  967. X                    F5  shell up to a new command interpeter
  968. X                    F7  QUICK exit (write out all changed buffers and exit)
  969. X                    F9  exit MicroEMACS           F10 exit to CONTROL MENU
  970. X--<<14>>-----------------------------------------------------------------------
  971. XMicroEMACS 3.7      F1 find file                  F2 save current file
  972. X  File Access       F3 view file (in VIEW mode)   F4 write file w/ new name
  973. X                    F5 read file into buffer      F6 change current file name
  974. X                    F7 insert file into buffer
  975. X                                                  F10  exit to CONTROL MENU
  976. X--<<15>>-----------------------------------------------------------------------
  977. XMicroEMACS 3.7      F1 bind a function to a key
  978. X  Key Bindings      F3 unbind a key
  979. X                    F5 describe a key
  980. X                    F7 describe all bindings
  981. X                                                  F10  exit to CONTROL MENU
  982. X--<<16>>-----------------------------------------------------------------------
  983. XMicroEMACS 3.7      F1 define macro         The keyboard macro only works
  984. X  Keyboard Macro    F3 end macro            for standard commands, NOT for
  985. X                    F5 execute macro        menu selections.
  986. X
  987. X                                                  F10  exit to CONTROL MENU
  988. X--<<17>>-----------------------------------------------------------------------
  989. XMicroEMACS 3.7      F1 set mode                   F2  set global mode
  990. X  Modes             F3 delete mode                F4  delete global mode
  991. X            Standard modes are:                   F6  set fill column
  992. X                WRAP  VIEW  CMODE  EXACT OVER MAGIC
  993. X                                                  F10 exit to CONTROL MENU
  994. X--<<18>>-----------------------------------------------------------------------
  995. XMicroEMACS 3.7      F1 execute script file        F2  execute script line
  996. X  Script            F3 execute script in buffer   F4  execute command (by name)
  997. X            Script line format:
  998. X         {<repeat count>} <command name> {<argument(s)> | "<argument(s)>"}
  999. X                                                  F10  exit to CONTROL MENU
  1000. X--<<19>>-----------------------------------------------------------------------
  1001. XMicroEMACS 3.7      F1 split current window       F2  delete all other windows
  1002. X  Windows           F3 resize window              F4  delete current window
  1003. X                    F5 shrink window              F6  enlarge window
  1004. X                    F7 next window                F8  previous window
  1005. X                                                  F10 exit to CONTROL MENU
  1006. X-------------------------------------------------------------------------------
  1007. FRIDAY_NIGHT
  1008. echo extracting - newpage.cmd
  1009. sed 's/^X//' > newpage.cmd << 'FRIDAY_NIGHT'
  1010. X;    NEWPAGE.CMD:    Startup page Loader
  1011. X;            for MicroEMACS 3.9d and above
  1012. X;            (C)opyright 1987 by Daniel M Lawrence
  1013. X
  1014. X; Get rid of the last page
  1015. X    set $discmd FALSE
  1016. X    write-message [Cleaning]
  1017. X    run clean
  1018. X    delete-buffer "[clean]"
  1019. X
  1020. X; make sure the function key window is up
  1021. X    set %rcfkeys FALSE
  1022. X    execute-macro-1
  1023. X
  1024. X; Write out the page load instructions
  1025. X    save-window
  1026. X    1 next-window
  1027. X    beginning-of-file
  1028. X    set $curcol 25
  1029. X    overwrite-string "           Available Pages to Load:                 "
  1030. X    next-line
  1031. X    set $curcol 25
  1032. X    overwrite-string "    [W]  WORDprocessing                             "
  1033. X    next-line
  1034. X    set $curcol 25
  1035. X    overwrite-string "    [P]  PROGramming                                "
  1036. X    next-line
  1037. X    set $curcol 18
  1038. X    overwrite-string "    "
  1039. X    set $curcol 25
  1040. X    overwrite-string "    [B]  BOX/block editing                          "
  1041. X    next-line
  1042. X    set $curcol 25
  1043. X    overwrite-string "[space]  to load a user page                        "
  1044. X    unmark-buffer
  1045. X    beginning-of-file
  1046. X    !force restore-window
  1047. X    update-screen
  1048. X
  1049. X; prompt for the page
  1050. X
  1051. X    write-message "Page to load: "
  1052. X*prompt
  1053. X    set %rctmp >key
  1054. X    clear-message-line
  1055. X    
  1056. X; check for an abort
  1057. X    !if &seq %rctmp ""
  1058. X        write-message "[Aborted]"
  1059. X        save-window
  1060. X        1 next-window
  1061. X        beginning-of-file
  1062. X        set $curcol 25
  1063. X        overwrite-string "   MicroEMACS:  Text Editor                         "
  1064. X        next-line
  1065. X        set $curcol 25
  1066. X        overwrite-string "                                                    "
  1067. X        next-line
  1068. X        set $curcol 25
  1069. X        overwrite-string "  Available function key Pages include:             "
  1070. X        next-line
  1071. X        set $curcol 25
  1072. X        overwrite-string "    WORD  PROG  BOX                                 "
  1073. X        next-line
  1074. X        set $curcol 25
  1075. X        overwrite-string "  [use the f8 key to load Pages]                    "
  1076. X        unmark-buffer
  1077. X        beginning-of-file
  1078. X        !force restore-window
  1079. X        set $discmd TRUE
  1080. X        !return
  1081. X    !endif
  1082. X    
  1083. X; if it is an unlisted page, get it's name
  1084. X    !if &seq %rctmp " "
  1085. X        set %rcfile &cat @"Name of Page to load: " ".cmd"
  1086. X    !else
  1087. X        set %rcfile &cat %rctmp "page.cmd"
  1088. X    !endif
  1089. X
  1090. X; see if this is a legit file
  1091. X    !if &seq &find %rcfile ""
  1092. X        write-message "%No Such Page, Page to load: "
  1093. X        !goto prompt
  1094. X    !endif
  1095. X
  1096. X;and lastly, execute it
  1097. X
  1098. X    execute-file %rcfile
  1099. X    set $discmd TRUE
  1100. FRIDAY_NIGHT
  1101. echo extracting - ppage.cmd
  1102. sed 's/^X//' > ppage.cmd << 'FRIDAY_NIGHT'
  1103. X;    PPAGE.CMD:    Programming Macro Page
  1104. X;            for MicroEMACS 3.9d and above
  1105. X;            (C)opyright 1987 by Daniel M Lawrence
  1106. X
  1107. X; set the clean procedure up
  1108. Xstore-procedure clean
  1109. X    delete-buffer "[Macro 10]"
  1110. X    delete-buffer "[Macro 11]"
  1111. X    delete-buffer "[Macro 12]"
  1112. X    delete-buffer "[Macro 13]"
  1113. X    bind-to-key execute-macro-14 FNX
  1114. X    bind-to-key execute-macro-15 FNY
  1115. X    delete-buffer "[Macro 16]"
  1116. X    delete-buffer "[Macro 17]"
  1117. X    bind-to-key execute-macro-18 FN\
  1118. X    bind-to-key execute-macro-19 FN]
  1119. X!endm
  1120. X
  1121. X; make sure the function key window is up
  1122. X    set %rcfkeys FALSE
  1123. X    execute-macro-1
  1124. X    write-message "Loading..."
  1125. X
  1126. X; Write out the page instructions
  1127. X    save-window
  1128. X    1 next-window
  1129. X    beginning-of-file
  1130. X    set $curcol 25
  1131. X    overwrite-string " F1 display variable       F2 evaluate expression"
  1132. X    next-line
  1133. X    set $curcol 25
  1134. X    overwrite-string " F3 compile buffer         F4 debug mode [OFF]"
  1135. X    next-line
  1136. X    set $curcol 25
  1137. X    overwrite-string " F5 execute buffer         F6 execute macro"
  1138. X    next-line
  1139. X    set $curcol 18
  1140. X    overwrite-string "PROG"
  1141. X    set $curcol 25
  1142. X    overwrite-string " F7 indent region          F8 undent region"
  1143. X    next-line
  1144. X    set $curcol 25
  1145. X    overwrite-string " F9 execute DOS command   F10 shell to DOS"
  1146. X    unmark-buffer
  1147. X    beginning-of-file
  1148. X    !force restore-window
  1149. X    update-screen
  1150. X
  1151. X; display a variable
  1152. X
  1153. X10    store-macro
  1154. X    set %rcdebug $debug
  1155. X    set $debug FALSE
  1156. X    set %rctmp @&cat &cat "Variable to display[" %rcvar "]: "
  1157. X    !if ¬ &seq %rctmp ""
  1158. X        set %rcvar %rctmp
  1159. X    !endif
  1160. X    write-message &cat &cat &cat %rcvar " = [" &ind %rcvar "]"
  1161. X    set $debug %rcdebug
  1162. X!endm
  1163. X
  1164. X;    evaluate expresion
  1165. X
  1166. X11    store-macro
  1167. X    delete-buffer "[temp]"
  1168. X    set %rcbuf $cbufname
  1169. X    set %cline $cwline
  1170. X    select-buffer "[temp]"
  1171. X    insert-string "set %rcval "
  1172. X    !force insert-string @"EXP: "
  1173. X    execute-buffer "[temp]"
  1174. X    unmark-buffer
  1175. X    select-buffer %rcbuf
  1176. X    delete-buffer "[temp]"
  1177. X    %cline redraw-display
  1178. X    write-message &cat &cat "Value = [" %rcval "]"
  1179. X!endm
  1180. X
  1181. X;    compile the current buffer
  1182. X
  1183. X12    store-macro
  1184. X;    here is where to add code to handle compiling the current buffer
  1185. X    write-message "[No Compiler module loaded]"
  1186. X!endm
  1187. X
  1188. X;    Toggle debug mode
  1189. X
  1190. X13    store-macro
  1191. X    set $debug FALSE
  1192. X    set %cbuf $cbufname
  1193. X    set %cline $cwline
  1194. X    select-buffer "Function Keys"
  1195. X    beginning-of-file
  1196. X    next-line
  1197. X    68 forward-character
  1198. X    set %rcdebug &equ $curchar 70
  1199. X    delete-previous-character
  1200. X    2 delete-next-character
  1201. X    !if %rcdebug
  1202. X        insert-string "ON "
  1203. X    !else
  1204. X        insert-string "OFF"
  1205. X    !endif
  1206. X    unmark-buffer
  1207. X    select-buffer %cbuf    
  1208. X    %cline redraw-display
  1209. X    write-message &cat &cat "[Debug Mode " %rcdebug "]"
  1210. X    set $debug %rcdebug
  1211. X!endm
  1212. X
  1213. X    bind-to-key execute-buffer FNX
  1214. X    bind-to-key execute-macro FNY
  1215. X
  1216. X;    indent region
  1217. X
  1218. X16    store-macro
  1219. X    write-message "[Indenting region]"
  1220. X    set %endline $curline
  1221. X    set %endpos $cwline
  1222. X    exchange-point-and-mark
  1223. X    set $discmd FALSE
  1224. X    set-mark
  1225. X    set $discmd TRUE
  1226. X
  1227. X    !while &gre %endline $curline
  1228. X        beginning-of-line
  1229. X        handle-tab
  1230. X        next-line
  1231. X    !endwhile
  1232. X
  1233. X    beginning-of-line    
  1234. X    set $cwline %endpos
  1235. X    write-message "[Region indented]"
  1236. X!endm
  1237. X
  1238. X;    undent region
  1239. X
  1240. X17    store-macro
  1241. X    write-message "[Undenting region]"
  1242. X    set %endline $curline
  1243. X    set %endpos $cwline
  1244. X    exchange-point-and-mark
  1245. X    set $discmd FALSE
  1246. X    set-mark
  1247. X    set $discmd TRUE
  1248. X
  1249. X    !while &gre %endline $curline
  1250. X        beginning-of-line
  1251. X        !if &gre $lwidth 0
  1252. X            delete-next-character
  1253. X        !endif
  1254. X        next-line
  1255. X    !endwhile
  1256. X
  1257. X    beginning-of-line    
  1258. X    set $cwline %endpos
  1259. X    write-message "[Region undented]"
  1260. X!endm
  1261. X
  1262. X    bind-to-key shell-command FN\
  1263. X    bind-to-key i-shell FN]
  1264. X    set %rcvar ""
  1265. X    write-message "[Program page loaded]"
  1266. FRIDAY_NIGHT
  1267. echo med.3 completed!
  1268. # That's all folks!
  1269.