;=============================================================================== ; File: eMACs Startup ; ; Description: eMACs Startup file, containing commands to be executed at ; startup of the program. ; ; Author: Gertjan J Noordman - 900525 ;=============================================================================== 4 set-tab-size ; Set tab size to 4 set $fillcol 70 ; Set wrap around column to 70 add-global-mode Wrap ; Wrap around mode as default for all windows ; Examples for other options (not activated) ;10 set-screen-font-size ; Set screen font size to 10 points ;75 change-screen-width ; Set screen width to 75 characters ;20 change-screen-size ; Set screen window length to 20 lines ;set $hidewindow TRUE ; Set the hide window indicator, i.e. hide the ; window when program is not active (in multifinder) ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Bind function keys F1 until F10 (Option-1 to Option-0). ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ bind-to-key execute-macro-30 FN-a ; F1 bind-to-key kill-region FN-b ; F2 bind-to-key copy-region FN-c ; F3 bind-to-key yank FN-d ; F4 bind-to-key execute-macro-40 FN-e ; F5 bind-to-key execute-macro FN-f ; F6 bind-to-key execute-macro-37 FN-g ; F7 bind-to-key execute-macro-38 FN-h ; F8 bind-to-key execute-macro-39 FN-i ; F9 bind-to-key execute-macro-32 FN-j ; F10 bind-to-key execute-macro-32 FN-? ; Help key ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to toggle function key window off. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 30 store-macro save-window ; Push current window 1 next-window ; Go to top window !if &sequal "«Function Keys»" $cbufname delete-window !endif bind-to-key execute-macro-31 FN-a !force restore-window ; Pop original window write-message "Function Key window off" !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to toggle function key window back on. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 31 store-macro 1 next-window ; Go to top window !if &sequal $cbufname "eMACs Help" execute-macro-33 !endif !if ¬ &sequal $cbufname "«Function Keys»" 1 split-current-window select-buffer "«Function Keys»" !force 2 resize-window ; Set window size to 2 lines beginning-of-file !endif bind-to-key execute-macro-30 FN-a 2 next-window write-message "Function Key window on" !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to enter Help window. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 32 store-macro 1 next-window ; Go to top window !if &sequal $cbufname "«Function Keys»" ; No function key window delete-window bind-to-key execute-macro-31 FN-a !endif help bind-to-key execute-macro-35 M-v bind-to-key execute-macro-36 ^V bind-to-key execute-macro-33 FN-j bind-to-key execute-macro-33 FN-? bind-to-key execute-macro-34 ^Xn bind-to-key execute-macro-34 ^Xp bind-to-key execute-macro-34 ^Z bind-to-key execute-macro-34 M-z beginning-of-file 1 forward-character clear-message-line !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to exit Help window. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 33 store-macro 1 next-window ; Go to top window bind-to-key previous-page M-v bind-to-key next-page ^V bind-to-key execute-macro-32 FN-j bind-to-key execute-macro-32 FN-? bind-to-key next-window ^Xn bind-to-key previous-window ^Xp bind-to-key scroll-window-down ^Z bind-to-key scroll-window-up M-z delete-window clear-message-line !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to don't allow these commands from within the HELP window. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 34 store-macro write-message "Use F10 (Option-0) to exit Help" !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to go to the previous help page. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 35 store-macro beginning-of-line search-reverse "«" 1 line-to-top-of-window !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to go to the next help page. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 36 store-macro beginning-of-line 2 forward-character search-forward "«" 1 line-to-top-of-window !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to reformat indented region. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 37 store-macro write-message "Formatting Indented ParagraphŠŠ" kill-region 2 split-current-window select-buffer "«temp»" yank beginning-of-file replace-string "~n " "~n" ; Replace with 66 fill-column fill-paragraph 77 fill-column beginning-of-file replace-string ~n "~n " ; Replace with end-of-file 2 delete-previous-character beginning-of-file set-mark end-of-file kill-region unmark-buffer delete-window yank delete-buffer "«temp»" write-message "Formatted Indented Paragraph." !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to indent region. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 38 store-macro write-message "Indenting RegionŠŠ" kill-region 2 split-current-window select-buffer "«temp»" yank beginning-of-file insert-tab replace-string "~n" "~n " end-of-file 3 delete-previous-character beginning-of-file set-mark write-message "Indenting RegionŠŠ" end-of-file kill-region unmark-buffer delete-window yank delete-buffer "«temp»" write-message "Region Indented." !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to un-indent region. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 39 store-macro write-message "Un-indenting RegionŠŠ" kill-region 2 split-current-window select-buffer "«temp»" yank beginning-of-file delete-next-character replace-string "~n " "~n" end-of-file 2 delete-previous-character beginning-of-file set-mark write-message "Un-indenting RegionŠŠ" end-of-file kill-region unmark-buffer delete-window yank delete-buffer "«temp»" write-message "Region Un-indented." !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Macro definition to resize screen window. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 40 store-macro 75 change-screen-width ; Set screen width to 75 characters 20 change-screen-size ; Set screen window length to 20 lines !endm ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ ; Bring up the function key window at startup time to show the current ; assignments to the function keys. ;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ 1 split-current-window select-buffer "«Function Keys»" 2 resize-window insert-string "F1 FN Keys F3 Copy F5 Size Screen F7 Format Indented Reg F9 Undent Reg~n" insert-string "F2 Cut F4 Paste F6 Exec Macro F8 Indent Region F10 Help~n" beginning-of-file delete-mode Magic delete-mode Wrap unmark-buffer next-window .