1; 2; Brief Emulation using MicroEMACS 3.12 or higher 3; 4; (C)opyright 1994 by Jim Kissel 5; 6; Comments, suggestions and bugs to jlk@sni.co.uk 7; 8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 9; 10; Section 1 User Variables for Brief Emulation 11; 12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 13; 14; Brief Variables for Key Bindings 15; 16set $discmd FALSE 17 18set %bf_end 4 ; the end key (see end of emacsrc for info on how to) 19set %bf_home 2108 ; the home key (determine these values) 20set %bf_bcnt 1 ; number of strings used by bf_ckbkup 21set %bf_bklst1 " " ; insure that the first backup list string exists 22set %bf_btoggle TRUE ; if TRUE backup files else don't 23 24set $sscroll TRUE 25set $hardtab 4 26set $timeflag TRUE ; time on status line Not Brief style ;-( 27set $posflag TRUE ; nor is the position ;-( but it will do for now 28set %bf_macro FALSE 29 30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 31; 32; Section 2 General Procedure for Brief Emulation 33; 34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 35 36; 37; Remember the last key for HOME:HOME:HOME & END:END:END processing 38; 39store-procedure bf_home_end 40 !if &equ $lastkey %bf_end 41 set %brief_end &add %brief_end 1 42 !else 43 set %brief_end 1 44 !endif 45 !if &equ $lastkey %bf_home 46 set %brief_home &add %brief_home 1 47 !else 48 set %brief_home 1 49 !endif 50!endm 51set $cmdhook bf_home_end 52 53; 54; Setup the correct modes for Brief 55; 56store-procedure brief_startup_mode 57 set $ssave FALSE 58 set $cmode 72 ; EXACT + MAGIC or search/replace 59 set $gmode 72 60 set %bf_dot &sin $cfname "." 61 !if %bf_dot 62 set %bf_ftype &rig $cfname &sub &len $cfname %bf_dot 63 !if &or &seq "c" %bf_ftype &seq "h" %bf_ftype 64 add-mode "CMODE" 65 !endif 66 !endif 67!endm 68set $readhook brief_startup_mode 69 70; 71; Parse the error file. Part of Ctrl-P Error processing 72; 73; This code is OS and Compiler specific. Currently the Brief Emulation 74; supports the output from AT&T 5.4 and AIX compilers. Post me other 75; compiler error outputs for inclusion or write your one. 76; jlk@sni.co.uk 77; 78store-procedure bf_parse_error_file 79 ; 80 ; this parses AT&T compiler output 81 ; 82 set %bf_start &add &sin $line "line" 4 83 set %bf_len &sub &sin $line ":" %bf_start 84 set %bf_lnum &mid $line %bf_start %bf_len 85 ; 86 ; you get >>> 211.16<<< under AIX. Parse it some more 87 ; 88 set %bf_lnum &right %bf_lnum &sub &len %bf_lnum 1 89 set %bf_lnum &left %bf_lnum &sub &sin %bf_lnum "." 1 90 ; 91 ; end of AIX specific parse 92 ; 93 unbind-key ^M 94 bind-to-key %bf_newline ^M 95 set %bf_start &sin $line "error" 96 set %bf_error &right $line &sub $lwidth &sub %bf_start 1 97 find-screen "MAIN" 98 goto-line %bf_lnum 99 write-message %bf_error 100!endm 101 102; 103; Store the file name in the backup string array 104; Part of Brief Backup 105; 106; if there is room in the last backup string 107; store the file name 108; else 109; create a new backup string and increment the count 110; 111store-procedure bf_backup_str 112 set %bf_ttmp &cat "%bf_bklst" %bf_bcnt 113 !if &gre &add &len %bf_file &len &ind %bf_ttmp 127 114 set %bf_bcnt &add %bf_bcnt 1 115 set %bf_ttmp &cat "%bf_bklst" %bf_bcnt 116 set &ind %bf_ttmp &cat " " %bf_file 117 !else 118; set %bf_tttmp &cat &ind %bf_ttmp %bf_file 119; set &ind %bf_ttmp %bf_tttmp 120 set &ind %bf_ttmp &cat &ind %bf_ttmp %bf_file 121 !endif 122!endm 123 124; 125; Brief Check Backup 126; 127; Check if the current files has been backed up 128; if it has %bf_ret is set TRUE 129; else set %bf_ret FALSE and call bf_backup_str 130; to add it to the list of already backed up files 131; 132store-procedure bf_ckbkup 133 set %bf_ret FALSE 134 set %bf_tmp %bf_bcnt 135 !while ¬ &equ %bf_tmp 0 136 ; 137 ; look for the file name in the current backup string 138 ; if we find it set bf_ret TRUE and retur 139 ; else save the file name in the backup string array 140 ; 141 set %bf_ttmp &cat "%bf_bklst" %bf_tmp 142 set %bf_file &fin $cfname 143 !if ¬ &equ &sin &ind %bf_ttmp %bf_file 0 144 set %bf_ret TRUE 145 !return 146 !else 147 bf_backup_str 148 !endif 149 set %bf_tmp &sub %bf_tmp 1 150 !endwhile 151!endm 152 153; 154; Backup a file if $BBACKUP is set in the environment 155; and we haven't already backed up this file 156; 157; WARNINGS***WARNING***WARNING***WARNING***WARNING 158; 159; If you are editing two files with the same filename 160; the last one written will be the only one in $BBACKUP 161; This limitation will be repaired, once it is possible to 162; determine the fully qualified path of each file, hopefully in 163; MicroEMACS 3.13 164; 165; WARNINGS***WARNING***WARNING***WARNING***WARNING 166; 167store-procedure bf_bfile 168 set %bbdir &env BBACKUP 169 !if ¬ &equ &len %bbdir 0 170 bf_ckbkup 171 !if &ind %bf_ret TRUE 172 write-message "backup already done" 173 !else 174 write-message "Creating backup file..." 175 set %bf_cmd &cat &cat &cat "cp " %bf_file " " &env BBACKUP 176 shell-command %bf_cmd 177 !endif 178 !else 179 write-message "$BBACKUP not set" 180 !endif 181!endm 182 183 184;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 185; 186; Section 3 KeyBindings a Specific Procedure for Brief Emulation 187; 188;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 189 190; 191; Alt-A Non-Inclusive Mark 192; 193; Maped to Esc-A M-A 194; 195unbind-key M-A 196bind-to-key set-mark M-A 197 198; 199; Ctrl-A not used by Brief 200; 201; just unbind 202; 203unbind-key ^A 204 205; 206; Alt-B Buffer List Differenct from Brief Buffer List 207; 208; Maped to Esc-B M-B 209; 210; note: room for improvement in the style of Brief 211; 212unbind-key M-B 213bind-to-key list-buffers M-B 214 215; 216; Ctrl-B Line to Bottom (of screen) 217; 218store-procedure brief-line-to-bottom 219 &sub $wline $cwline move-window-up 220!endm 221unbind-key ^B 222macro-to-key brief-line-to-bottom ^B 223 224; 225; Alt-C Column Mark 226; 227; Not implemented. Columns not supported by MicroEmacs. 228; 229 230; 231; Ctrl-C Centre Line in Window 232; 233store-procedure brief-centre-line 234; &sub &div $wline 2 $cwline move-window-up ;this should work but doesn't 235 set %briefctr &sub &div $wline 2 $cwline 236 !if &les %briefctr 0 237 &abs %briefctr move-window-down 238 !else 239 %briefctr move-window-up 240 !endif 241!endm 242unbind-key ^C 243macro-to-key brief-centre-line ^C 244 245; 246; Alt-D Delete Line 247; 248; Maped to Esc-D M-D 249; 250store-procedure brief-delete-line 251 set %briefcol $curcol 252 beginning-of-line 253 !if &LEN $line 254 !force kill-to-end-of-line 255 !force kill-to-end-of-line 256 !else 257 !force kill-to-end-of-line 258 !endif 259 !if &GRE %briefcol $lwidth 260 end-of-line 261 !else 262 %briefcol forward-character 263 !endif 264!endm 265unbind-key M-D 266macro-to-key brief-delete-line M-D 267 268; 269; Ctrl-D Scroll Buffer Down not implemented 270; 271; Ctrl-D is the same as the End key on most Unix keyboards so....... 272; 273 274; 275; Alt-E Edit file 276; 277; Maped to Esc-E M-E 278; 279bind-to-key find-file M-E 280 281; 282; Ctrl-E is not used by Brief 283; 284; just unbind 285; 286unbind-key ^E 287 288; 289; Alt-F Display File Name 290; 291; just unbind. Well is on the status line ;-) 292; 293unbind-key M-F 294 295; 296; Ctrl-F is not used by Brief 297; 298unbind-key ^F 299 300; 301; Alt-G Go to Line 302; 303; Maped to Esc-G M-G 304; wow !!! a match !!! 305; 306 307; 308; Alt-H Help! 309; 310; Maped to Esc-H M-H 311; For now we use the apropos command 312; 313bind-to-key apropos M-H 314 315; 316; Ctrl-H is backspace in both Brief and MicroEmacs 317; 318 319; 320; Alt-I Insert Mode Toggle 321; 322; Maped to Esc-I M-I. Toggle insert/overtype mode 323; Note Brief changes global modes. This may not suit everyone 324; 325; cmode is also set so the current buffer over/insert mode is 326; also changed. 32 is the bitwise position of overwrite mode. 327; 328store-procedure brief-toggle-insert-mode 329 !if &ban $gmode 32 330 delete-global-mode over 331 !else 332 add-global-mode over 333 !endif 334 !if &ban $cmode 32 335 delete-mode over 336 !else 337 add-mode over 338 !endif 339!endm 340macro-to-key brief-toggle-insert-mode M-I 341 342; 343; Ctrl-I Tab same in Micro-Emacs!!!! 344; 345 346; 347; Alt-J Jump to Bookmark 348; 349; Maped to Esc-J M-J 350; 351bind-to-key goto-mark M-J 352 353; 354; Alt-K Delete to End of Line 355; 356; Maped to Esc-K M-K 357; 358unbind-key M-K 359bind-to-key kill-to-end-of-line M-K 360 361; 362; Ctrl-K Not used by Brief (just unbind) 363; 364unbind-key ^K 365 366; 367; Alt-L Line Mark No equilvent in MicroEmacs 368; 369; We could simulate by eol;set-mark;bol if required but this 370; is different from Brief 371; 372unbind-key M-L 373 374; 375; Ctrl-L Not used by Brief 376; 377unbind-key ^L 378 379; 380; Alt-M Mark 381; 382; Maped to Esc-M M-M 383; 384unbind-key M-M 385bind-to-key set-mark M-M 386 387; 388; Ctrl-M is newline in Brief and MicroEmacs 389; 390 391; 392; Alt-N Next Buffer 393; 394; Maped to Esc-N M-N 395; 396store-procedure brief-next-buffer 397 !force next-buffer 398 !if $status 399 clear-message-line 400 !else 401 write-message "No other buffers." 402 !endif 403!endm 404unbind-key M-N 405macro-to-key brief-next-buffer M-N 406 407; 408; Ctrl-N Next Error 409; 410; Will add to the Ctrl-P processing next release 411; 412unbind-key ^N 413 414; 415; Alt-O Change Output File 416; 417; Maped to Esc-O M-O 418; 419bind-to-key change-file-name M-O 420 421; 422; Ctrl-O Not used by Brief 423; 424unbind-key ^O 425 426; 427; Alt-O Print Block: Not supported by Micro-Emacs 428; 429;unbind-key M-P 430 431; 432; Ctrl-P Error Display 433; 434store-procedure bf_display_error 435 set %bf_dot &sin $cfname "." 436 !if %bf_dot 437 set %bf_ftype &rig $cfname &sub &len $cfname %bf_dot 438 !if ¬ &seq "c" %bf_ftype 439 write-message "No errors." 440 !return 441 !endif 442 !endif 443 set %bf_hfile $cfname 444 set %bf_tmp &left $cfname &sub &len $cfname 1 445 set %bf_filename &cat %bf_tmp "err" 446!force find-file %bf_filename 447 !if &seq $status FALSE 448 find-file %bf_hfile 449 delete-buffer %bf_filename 450 write-message "No errors." 451 !else 452 add-mode "VIEW" 453 set %bf_newline &bind ^M 454 unbind-key ^M 455 macro-to-key bf_parse_error_file ^M 456 !endif 457!endm 458unbind-key ^P 459macro-to-key bf_display_error ^P 460 461; 462; Alt-Q Quote 463; 464; Maped to Esc-Q M-Q 465; 466unbind-key M-Q 467bind-to-key quote-character M-Q 468 469; 470; Ctrl-Q Not used by Brief 471; 472;unbind-key ^Q 473 474; 475; Alt-R Read File 476; 477; Maped to Esc-R M-R 478; 479unbind-key M-R 480bind-to-key insert-file M-R 481 482; 483; Ctrl-R Repeat 484; 485unbind-key ^R 486bind-to-key universal-argument ^R 487 488; 489; Alt-S Search Forward 490; 491; Maped to Esc-S M-S 492; 493bind-to-key search-forward M-S 494 495; 496; Ctrl-S not used by Brief 497; 498unbind-key ^S 499 500; 501; Alt-T Translate Forward 502; 503; Query-replace-string is a better match than replace-string 504; 505bind-to-key query-replace-string M-T 506 507; 508; Ctrl-T Line to Top (of screen) 509; 510store-procedure brief-line-to-top 511 &sub $cwline 1 move-window-down 512!endm 513unbind-key ^T 514macro-to-key brief-line-to-top ^T ; line to top (of window) 515 516; 517; Alt-U Undo Not currently supported by 3.12 518; 519; But comming to a new version of MicroEMACS near you soon...... 520; Just needs some BETA testers. Contact Jim Kissel jlk@sni.co.uk 521; 522unbind-key M-U 523;bind-to-key undo M-U 524 525; 526; Ctrl-U Scroll buffer Up 527; 528; ^U move-window-down in MicroEmacs is the same (similar?) 529; 530bind-to-key move-window-down ^U 531 532; 533; Alt-V Display Version Id 534; 535; Maped to Esc-V M-V 536; just for those who cannot read the status line 537; 538store-procedure brief-version 539 write-message &cat $progname &cat " " $version 540!endm 541unbind-key M-V 542macro-to-key brief-version M-V 543 544; 545; Ctrl-V not used by Brief 546; 547unbind-key ^V 548 549; 550; Alt-W Write 551; 552; Maped to Esc-W M-W 553; 554store-procedure brief_save_file 555 !if &SEQ $region "ERROR" 556 !if &BAN $cbflags 2 557 !if &seq %bf_btoggle TRUE 558 bf_bfile 559 !endif 560 save-file 561 !else 562 write-message "File has not been modified -- not written." 563 !endif 564 !else 565 save-file ; for now do a write block later 566 !endif 567; clear-message-line 568!endm 569unbind-key M-W 570macro-to-key brief_save_file M-W 571 572; 573; Ctrl-W Backup File Toggle 574; 575store-procedure bf_back_toggle 576 !if &seq %bf_btoggle TRUE 577 write-message "Backup files will not be created." 578 set %bf_btoggle FALSE 579 !else 580 write-message "Backup files will be created." 581 set %bf_btoggle TRUE 582 !endif 583!endm 584unbind-key ^W 585macro-to-key bf_back_toggle ^W 586 587; 588; Alt-X Exit 589; 590; Maped to Esc-X M-X 591; 592unbind-key M-X 593bind-to-key exit-emacs M-X 594 595; 596; Ctrl-X Write Files and Exit 597; 598; t.b.a 599; 600 601; 602; Alt-Z Suspend Brief 603; 604; Maped to Esc-Z M-Z MicroEmacs i-shell 605; 606unbind-key M-Z 607bind-to-key i-shell M-Z 608 609; 610; Ctrl-Z Zoom Window 611; 612; missing for now (will add later) 613; 614unbind-key ^Z 615 616; 617; Alt-minus Previous Buffer 618; 619; Keyboard - is mapped to M-- (Alt-minus) which conflicts wiht 620; this command. Not implimented at present. 621; 622 623; 624; Ctrl-minus Delete Current Buffer 625; 626store-procedure brief_delete_current_buffer 627 set %brief_buf $cbufname 628 !force next-buffer 629 !if $status 630 delete-buffer %brief_buf 631 !else 632 write-message "Can't delete: no other buffers." 633 !endif 634!endm 635macro-to-key brief_delete_current_buffer ^_ 636 637; 638; Backspace no change from MicroEmacs 639; 640 641; 642; Ctrl-Backspace Delete Previous Word 643; 644; not implemented as my terminal emulator returns the same codes for 645; CTRL-Backspace and the Del key 646; 647 648; 649; Enter as per MicroEmacs 650; 651 652; 653; Ctrl-Enter Open Line 654; 655store-procedure brief_open_line 656 end-of-line 657 newline 658!endm 659unbind-key ^J 660macro-to-key brief_open_line ^J 661 662; 663; Esc Escape 664; 665; We are using Esc for the Alt key. ;-( can't map 666; 667 668; 669; Tab as per MicroEmacs 670; 671 672; 673; Shift-Tab is Back-Tab! Why do anything? 674; 675 676; 677; Alt-1 to Alt-0 Drop Bookmark n 678; 679; We either sacrifice Repeat 1 to 10 or we have only one mark? 680; 681 682; 683; F1 Change Window 684; 685; not quite brief style but it goes to previous/next window via cursor keys 686; 687store-procedure change-window 688*bwinretry 689 write-message "Point to destination (use cursor keys)" 690 set %briefchar >c 691 !if &seq %briefchar FNP ; the up arrow key 692 previous-window 693 !else 694 !if &seq %briefchar FNN ; the down arrow key 695 next-window 696 !else 697; !if $seq %briefchar &chr 7 ; abort ! 698; write-message "Command canceled" 699; !goto bwinend 700; !else 701;write-message &cat >>> &cat %briefchar <<< 702 !goto bwinretry 703; !endif 704;will fix this when I know how to read a ^G 705 !endif 706 !endif 707*bwinend 708!endm 709unbind-key ^XO 710unbind-key ^XP 711macro-to-key change-window FN1 712 713; 714; Alt F1 Toggle Borders 715; 716; We can realy toggle to borders but we can turn off the mode line so... 717; Maped to Esc-F1 M-FN1 718; 719; May not work on slow terminals or over telnet. try a 1 second pause 720; between the Esc and the F1. ;-( 721; 722store-procedure brief_toggle_borders 723 !if $modeflag 724 set $modeflag FALSE 725 !else 726 set $modeflag TRUE 727 !endif 728 clear-and-redraw 729!endm 730macro-to-key brief_toggle_borders M-FN1 731 732; 733; F2 Resize Window tba 734; 735 736; 737; Alt F2 Zoom Windows 738; 739; Maped to Esc-F2 M-F2 740; Just get rid of the other windows 741; 742bind-to-key delete-other-windows M-FN2 743 744; 745; F3 Create Window 746; 747; Not realy Brief Style 748; 749unbind-key ^X2 750bind-to-key split-current-window FN3 ; Brief Func Key 3 751 752; 753; F4 Delete Window 754; 755; Not realy Brief Style (yet) 756; 757bind-to-key delete-other-windows FN4 758 759; 760; F5 Search Forward 761; 762bind-to-key hunt-forward FN5 763 764; 765; F6 Translate Forward 766; 767bind-to-key query-replace-string FN6 768 769; 770; F7 Remember 771; 772store-procedure bf_remember 773 !if &seq %bf_macro TRUE 774 set %bf_macro FALSE 775 end-macro 776 !else 777 set %bf_macro TRUE 778 begin-macro 779 !endif 780!endm 781macro-to-key bf_remember FN7 782 783; 784; F8 Playback 785; 786bind-to-key execute-macro FN8 787 788; 789; F9 Load a Macro File 790; 791 792; 793; F-10 Execute Command 794; 795bind-to-key execute-named-command FN0 796 797; 798; HOME Beginning of Line 799; HOME HOME Teginning of Window 800; HOME HOME HOME Beginning of Buffer 801; 802store-procedure brief_home 803 !if &equ %brief_home 1 804 beginning-of-line 805 !else 806 !if &equ %brief_home 2 807 &sub $cwline 1 previous-line 808 beginning-of-line 809 810 !else 811 beginning-of-file 812 !endif 813 !endif 814!endm 815unbind-key FN< 816macro-to-key brief_home FN< 817 818; 819; END End of Line 820; END END Emd of Window 821; END END END End of Buffer 822; 823store-procedure brief-end 824 !if &equ %brief_end 1 825 end-of-line 826 !else 827 !if &equ %brief_end 2 828 &sub $wline $cwline next-line 829 end-of-line 830 !else 831 end-of-file 832 !endif 833 !endif 834!endm 835unbind-key ^D 836macro-to-key brief-end ^D 837 838; 839; Ctrl-Right Next Word 840; 841bind-to-key next-word M-: 842 843; 844; Ctrl-Left Previous Word 845; 846; My terminal emulator is bizarre Ctrl-Left_Arrow_Key returns M-9 847; so no book mark 9 for me ;-( 848; 849bind-to-key previous-word M-9 850 851; 852; Del Delete 853; 854store-procedure bf_delete 855 !if &SEQ $region "ERROR" 856 !force delete-next-character 857 !else 858 !if &LEN $region 859 kill-region 860 remove-mark ; otherwise you could kill another region when you move 861 !else 862 delete-next-character 863 !endif 864 !endif 865 clear-message-line 866!endm 867unbind-key ^? 868macro-to-key bf_delete ^? 869 870; 871; Ins Paste from Scrap 872; 873unbind-key FNC 874bind-to-key yank FNC 875 876; 877; Keypad - 878; 879; Maped to Esc - M-- 880; 881store-procedure bf_keypad_minus 882 !if &SEQ $region "ERROR" 883 beginning-of-line 884 !if &LEN $line 885 !force kill-to-end-of-line 886 !force kill-to-end-of-line 887 !else 888 !force kill-to-end-of-line 889 !endif 890 write-message "Line cut to scrap." 891 !else 892 !if &LEN $region 893 kill-region 894 remove-mark ; otherwise you could kill another region 895 write-message "Block deleted to scrap." 896 !else 897 !if &LEN $line 898 !force kill-to-end-of-line 899 !force kill-to-end-of-line 900 !else 901 !force kill-to-end-of-line 902 !endif 903 write-message "Line cut to scrap." 904 !endif 905 !endif 906!endm 907macro-to-key bf_keypad_minus M-- 908 909; 910; Keypad + 911; 912; Maped to Esc + M-+ 913; WARNING changes MARK 0 & 1 914; to make this work we need either a $MARKCOL[] $MARKLINE[] 915; or you need to write more code to save the marks before the copy 916; 917store-procedure bf_keypad_plus 918 !if &SEQ $region "ERROR" 919 1 set-mark 920 beginning-of-line 921 set-mark 922 next-line 923 copy-region 924 previous-line 925 1 exchange-point-and-mark 926 remove-mark 927 1 remove-mark 928 write-message "Line copied to scrap." 929 !else 930 !if &LEN $region 931 copy-region 932 remove-mark 933 write-message "Block copied to scrap." 934 !else 935 set %brief_col $curcol 936 beginning-of-line 937 set-mark 938 next-line 939 copy-region 940 previous-line 941 beginning-of-line 942 %brief_col forward-character 943 remove-mark 944 write-message "Line copied to scrap." 945 !endif 946 !endif 947!endm 948macro-to-key bf_keypad_plus M-+ 949 950 951;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 952; 953; Section 4 Non-Brief useful MicroEMACS bindings 954; 955;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 956 957bind-to-key goto-matching-fence M-% ; matching fence 958bind-to-key tag-word ^] ; vi c-tag 959bind-to-key back-from-tag-word ^^ ; vi c-tag 960 961;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 962; 963; Section 5 Brief Emulation Comments 964; 965;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 966; 967; Functions not implemented 968; 969; Alt-C Set Column Mark. Colums not (yet) supported in Micro-Emacs 970; Ctrl-D is returned by the END key so no Brief "Scroll Buffer Down" 971; Alt-E "Display File Name" as the emacs status line handles this 972; Alt-P "Print Block" not available in micro-emacs 973; Alt-U "Undo" not available in micro-emacs (current in BETA test) 974; Ctrl-X "Write Files and Exit" conflict with emacs ^X 975; Shift Tab as my terminal emulator doesn't do this 976; bookmarks as they must be entered via the universal-argument method 977; Shift-End not in my terminal emulator 978; 979 980;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 981; 982; Section 6 Brief Startup 983; 984; Requires modification to MicroEMACS 3.12 source to provide .emacsrc 985; with some information on how many arguments where passed at startup. 986; At present in my ALPHA source tree there is a new environment varialbe 987; $argcnt which contains the number of arguments passed to MicroEMACS 988; at startup. If $argcnt == 1 then no files as arguments, so restore 989; the previous files stored in the file pointed at by $BFILE as per BRIEF 990; 991; Hopefully Dan Lawerence will agree to incorporate this into the next 992; release of MicroEMACS. Brief Startup will also require Brief Shutdown 993; 994;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 995 996;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 997; 998; Section 7 Brief Exit 999; 1000; In order to store the information required by Brief Startup, a new 1001; environment variable $exithook will have to be provided. This will 1002; allow a macro to loop through all the current buffers and store the 1003; required information on each file in $BFILE for processing during 1004; startup if required. Again this is under ALPHA test and may be 1005; incorporated in the next release of MicroEMACS 1006;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1007 1008set $discmd TRUE 1009 1010; uncomment to determine value of keys 1011 1012;store-procedure bf_test 1013; write-message "Type a key: " 1014; write-message &cat "The key value is: " $lastkey 1015;!endm 1016;macro-to-key bf_test ^L 1017