|
|
1.1 ! root 1: @expand_abbrev: expand abbreviation [MACRO] ! 2: ! 3: Warren A. Montgomery, IH 6E-314, Version 3.2 ! 4: ! 5: Modified by K. R. Stanley, IH 4F-321, Version 4.2 5/26/81 ! 6: Uses ABBEVIATION FILE: for file name ! 7: bugs: uses mark 15 for temporary usage ! 8: To use this macro, set $HOME/.abbrevs to be the location of your ! 9: abbreviation file. Change @ to whatever character you want for ! 10: your abbrevations or have a macro call expand_abbrev. ! 11: It uses the name after ABBREVIATION FILE: as the file to use ! 12: in the $HOME directory. ! 13: B� save buffer, and delete previous word then add an @ ! 14: +<@ ! 15: <^ ! 16: ! 17: + make a copy starting with a newline ! 18: search for string "ABBREVIATION FILE:" in ! 19: first 10 lines ! 20: 15�10� mark here - go to 10'th line ! 21: <ABBREVIATION FILE: ! 22: look for string starting with "ABBREVIATION FILE:" ! 23: |� � in front of this line - if found ! 24: 18�- get file name, delete, and reinsert ! 25: <$HOME/ ! 26: +� start file name at home and add new file name ! 27: � else ! 28: � <$HOME/.abbrevs ! 29: �� put default file name in,end if and go back to ! 30: 15 where should be ! 31: - switch to abbrevfile (but don't complain if new) ! 32: 2>B Prepare to check if in .abbrevs (get old buffer ! 33: name and check present against it) ! 34: |� See if in abbrevs buffer ! 35: �&-2-� in buffer, just ignore it ! 36: (dump 2 copies of abbreviation and buffer name) ! 37: � �|� Not in buffer, process abbrevs ! 38: �-�< ! 39: search for abbreviation from back and if found ! 40: -�<@ ! 41: find space and mark next character go to next line ! 42: |��&�search for next at and go to end of ! 43: previous line ! 44: � �&��or go to end of buffer and ! 45: back up to end of next line ! 46: �%-�save region, return to buffer ! 47: and insert ! 48: � if not found in abbrev file ! 49: <abbreviation for ? ! 50: 0>< ! 51: |� �4& ask what abbrev for - check if null ! 52: �& -&if not - go to, end back up, ! 53: open line, store response and abbrev in buffer ! 54: �display_killstackshow status of buffer and stack ! 55: %2-@�restore and try again ! 56: � - else restore back in old buffer ! 57: %-��end of new abbrev ! 58: question ! 59: ����if found if in buffer ! 60:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.