|
|
researchv9-SUN3(old)
@expand_abbrev: expand abbreviation [MACRO] Warren A. Montgomery, IH 6E-314, Version 3.2 Modified by K. R. Stanley, IH 4F-321, Version 4.2 5/26/81 Uses ABBEVIATION FILE: for file name bugs: uses mark 15 for temporary usage To use this macro, set $HOME/.abbrevs to be the location of your abbreviation file. Change @ to whatever character you want for your abbrevations or have a macro call expand_abbrev. It uses the name after ABBREVIATION FILE: as the file to use in the $HOME directory. B� save buffer, and delete previous word then add an @ +<@ <^ + make a copy starting with a newline search for string "ABBREVIATION FILE:" in first 10 lines 15�10� mark here - go to 10'th line <ABBREVIATION FILE: look for string starting with "ABBREVIATION FILE:" |� � in front of this line - if found 18�- get file name, delete, and reinsert <$HOME/ +� start file name at home and add new file name � else � <$HOME/.abbrevs �� put default file name in,end if and go back to 15 where should be - switch to abbrevfile (but don't complain if new) 2>B Prepare to check if in .abbrevs (get old buffer name and check present against it) |� See if in abbrevs buffer �&-2-� in buffer, just ignore it (dump 2 copies of abbreviation and buffer name) � �|� Not in buffer, process abbrevs �-�< search for abbreviation from back and if found -�<@ find space and mark next character go to next line |���search for next at and go to end of previous line � ���or go to end of buffer and back up to end of next line �%-�save region, return to buffer and insert � if not found in abbrev file <abbreviation for ? 0>< |� �4& ask what abbrev for - check if null � -if not - go to, end back up, open line, store response and abbrev in buffer �display_killstackshow status of buffer and stack %2-@�restore and try again � - else restore back in old buffer %-��end of new abbrev question ����if found if in buffer
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.