mirror of
https://github.com/PDP-10/its.git
synced 2026-03-05 19:09:21 +00:00
Add more EMACS libraries:
AUTO-S, DIRED, TAGGEN, VT100, VT52.
This commit is contained in:
committed by
Eric Swenson
parent
f193d5408d
commit
d0bdad77c9
@@ -260,7 +260,10 @@ respond "EMACS Editor" "\033xload\033purify\r"
|
||||
respond "\n" "\033xgenerate\033emacs;info\033emacs1;info\r"
|
||||
respond ":EJ" "\033xbare\033emacs1;bare\r"
|
||||
respond "\n" "\033xgenerate\033emacs;abstr\033emacs1;abstr\r"
|
||||
#respond ":EJ" "\033xgenerate\033emacs;auto-s\033emacs1;auto-s\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;dired\033emacs1;dired\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;tags\033emacs1;tags\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;taggen\033emacs1;taggen\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;slowly\033emacs1;slowly\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;pictur\033emacs1;pictur\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;sort\033emacs1;sort\r"
|
||||
@@ -268,6 +271,8 @@ respond ":EJ" "\033xgenerate\033emacs;page\033emacs1;page\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;scrlin\033emacs1;scrlin\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;delim\033emacs1;delim\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;modlin\033emacs1;modlin\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;vt100\033emacs1;vt100\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;vt52\033emacs1;vt52\r"
|
||||
|
||||
respond ":EJ" "\033xrun\033einit\033? Document\r"
|
||||
respond "\n" "\030\003"
|
||||
|
||||
66
doc/emacs1/modlin.info
Executable file
66
doc/emacs1/modlin.info
Executable file
@@ -0,0 +1,66 @@
|
||||
The MODLIN Library Monday, February 4, 1980
|
||||
Updated Saturday, July 16, 1983
|
||||
|
||||
The mode line has the following form:
|
||||
|
||||
{editor} {time} [{superior}: {modeinfo} {options} {type} {buffer}] {file}
|
||||
|
||||
{editor} is the value of Emacs' "Editor Name" variable.
|
||||
|
||||
{time} is time and date, or just time (see below). This gets updated even
|
||||
if in a recursive ^R mode.
|
||||
|
||||
{superior} is displayed on ITS if this Emacs is not at toplevel (eg, when
|
||||
a LISPT lives under its lisp, you will see LISP: or in a MAILT
|
||||
you will see MAIL:)
|
||||
|
||||
{type} is the value of the Emacs "Editor Type" variable enclosed in angle
|
||||
brackets, or a "-" if no such value is assigned. If {buffer} is
|
||||
omitted (see below) and this would have displayed as a "-", it is
|
||||
also omitted.
|
||||
|
||||
{buffer} is now omitted if the buffer name is the same as fielname1 of {file}
|
||||
|
||||
{modeinfo} now shows the submode if any attached to the mode with a hyphen.
|
||||
eg, if you load the PICTUR library and do MM Edit Picture you
|
||||
might see something like:
|
||||
[MAIL: Fundamental-Picture ...]
|
||||
|
||||
{options} A number of new options now display. They include:
|
||||
|
||||
NoSave - Autosave, if normally on, has been disabled
|
||||
Save - Autosave turned on
|
||||
SaveOld - Save this file automatically if new file read
|
||||
into buffer
|
||||
NoSaveOld - Don't ask and don't save file if new file read
|
||||
into buffer
|
||||
ReadOnlyFile - Saving, as in C-X C-S, will query before allowing
|
||||
file to be written back. Saving via C-X C-W will
|
||||
not bother to query since it reads a new filename.
|
||||
ReadOnlyBuf - Buffer is protected from modification.
|
||||
ReadOnlyFile/Buf - Same as ReadOnlyFile+ReadOnlyBuf
|
||||
OverWrite - Overwrite mode enabled
|
||||
Def - Keyboard Macro definition underway
|
||||
Narrow - Buffer bounds have been narrowed.
|
||||
|
||||
Following these options, other user-set options, such as Abbrev
|
||||
mode, are inserted.
|
||||
|
||||
{file} is the file being visited. If the file is a ">" or "<" file (ITS)
|
||||
or ".0" or ".-2" file (Twenex), a designator "=nnn" where the nnn
|
||||
is the version number of the file which was actually visited.
|
||||
If the ">" or "<" file is not a numbered file, then the designation
|
||||
"~fn2" will appear where fn2 is the actual second filename of the
|
||||
visited file. Odd cases of fn2's which are not understood by MODLIN
|
||||
will appear as "#" in place of "=nnn" or "~fn2".
|
||||
|
||||
The following switch variables are of interest:
|
||||
|
||||
Time Only:0 Show date and time. This is the default.
|
||||
Time Only:1 Show time only.
|
||||
|
||||
Invert Filenames:0 Show filenames normally. This is the default.
|
||||
Invert Filenames:1 Show filenames in funny order. Useful if filenames
|
||||
are frequently too long to fit.
|
||||
FOO BAR JDOE; on ITS
|
||||
FOO.BAR PS:<JDOE> on Twenex
|
||||
40
doc/emacs1/vt100.info
Executable file
40
doc/emacs1/vt100.info
Executable file
@@ -0,0 +1,40 @@
|
||||
|
||||
KMP@MIT-MC 11/02/79 17:55:47
|
||||
To: INFO-EMACS at MIT-MC
|
||||
For those of you with VT100 terminals if you run in ANSII mode, the
|
||||
VT100 library, which you can get via
|
||||
|
||||
MM Load LibraryVT100
|
||||
|
||||
will set up the keypad to do pretty reasonable things as follows:
|
||||
|
||||
(1) Keypad digits and minus are args to the next command automatically.
|
||||
[Normal digits in main key area are self-inserting still].
|
||||
|
||||
(2) Comma will eventually be an arg separator for advanced commands that
|
||||
take precomma args. I haven't coded this yet.
|
||||
|
||||
(3) Dot runs ^R Documentation like ^_H or Top-H would normally do.
|
||||
|
||||
(4) Arrows go vertically up, down, back and forth, independent of what
|
||||
you define ^B,^F,^N,or ^P to do ...
|
||||
|
||||
(5) PF1-4 run macros you can define. They are initially undefined.
|
||||
|
||||
(6) Enter followed by a PF-key will read characters like the ^X(...^X) does
|
||||
up until the next ^X), C-M-C, or Enter that you type. You can abort
|
||||
a definition by doing ^].
|
||||
|
||||
Sorry for the length of the message, but hopefully this will be of interest
|
||||
to enough of you to make it worthwhile.
|
||||
|
||||
Interestingly enuf, this will not work on AI. No, I am not boycotting -- I
|
||||
just don't know what the new Emacs over there has done and I am nearly sure
|
||||
that my stuff is wholely incompatible at this point ... when the new emacs
|
||||
works its way back over to MC (which is happening slowly now), I will work
|
||||
on an all-ITS compatible version of the handler.
|
||||
|
||||
-kmp
|
||||
|
||||
|
||||
|
||||
235
src/emacs1/auto-s.118
Executable file
235
src/emacs1/auto-s.118
Executable file
@@ -0,0 +1,235 @@
|
||||
!* -*-TECO-*- *!
|
||||
|
||||
!~FILENAME~:! !New version of Auto Save Mode and its associates.!
|
||||
AUTO-SAVE-MODE
|
||||
|
||||
!& Setup AUTO-SAVE-MODE Library:! !S Install hooks, create variables.
|
||||
Runs Auto-Save-Mode Setup Hook, if it is non-0, in which case it
|
||||
must take care of setting keys, fsClkMacro, fsClkInterval, ..F and
|
||||
.F. We set those only when there is no hook.!
|
||||
|
||||
m(m.m& Declare Load-Time Defaults)
|
||||
Auto-Save-Mode Setup Hook,
|
||||
If non-0, called when AUTO-SAVE-MODE is loaded: 0
|
||||
|
||||
[1[k
|
||||
|
||||
!* First make sure no previous MM-variables are going to cover our functions:!
|
||||
|
||||
m.mKill Variableuk !* K: Killer.!
|
||||
mkMM & Auto Save Setupw !* Kill kill kill!
|
||||
mkMM & Auto Save Filew !* ...!
|
||||
mkMM ^R Save Filew !* ...!
|
||||
mkMM & Secretary Macrow !* ...!
|
||||
mkMM & Auto Save All Buffersw !* ...!
|
||||
mkMM & Real-time Interruptw !* ...!
|
||||
|
||||
!* Now do some of our own installing: !
|
||||
|
||||
!* Note that we will PREpend our exit hook, so that in case there!
|
||||
!* was already some other auto-saver hook there, we go first and!
|
||||
!* theirs probably will be a no-op since the buffers wont be!
|
||||
!* modified any more.!
|
||||
|
||||
0fo..qExit Hookf"ew :i*'u1 !* 1: Old hook.!
|
||||
@:i*|ff"e m(m.m& Auto Save All Buffers)' !* Prepend our hook.!
|
||||
1|m.vExit Hookw !* ...!
|
||||
|
||||
!* Some installing is only if there is no hook: !
|
||||
|
||||
qAuto-Save-Mode Setup Hookf"nu1 m1' !* Run hook, if non-0.!
|
||||
"#w !* No hook. We install.!
|
||||
m.m& Secretary Macrof(u.f)u..f !* .F, ..F: Install our one.!
|
||||
m.m& Real-time InterruptfsClkMacrow !* Install our clock!
|
||||
!* interrupt handler.!
|
||||
fsClkInterval"e 4*60*60fsClkIntervalw' !* set interval if none!
|
||||
m.m^R Save Fileu:.x()' !* C-X C-S: our save file function!
|
||||
|
||||
|
||||
|
||||
!& Auto Save Setup:! !S Decide whether to turn on auto saving for file!
|
||||
0[1 !* 1: to save or not to save!
|
||||
qBuffer Index[2 !* 2: index into .B of current buffer!
|
||||
qBuffer Filenamesf"nf[DFile !* if buffer filenames, examine them!
|
||||
fsDVersion"e !* saving to >!
|
||||
q:.b(q2+12)"e !* and not read-only!
|
||||
1u1''' !* then we save!
|
||||
q1u:.b(q2+10) !* just store the answer!
|
||||
|
||||
!& Auto Save File:! !S Subroutine that may write out an auto save file.
|
||||
NUMARG is Buffer Index of buffer in .B to save.
|
||||
We run Before Auto Save Hook and After Auto Save Hook if non-0.!
|
||||
|
||||
m(m.m& Declare Load-Time Defaults)
|
||||
Before Auto Save Hook, If non-0 is run just before auto saving: 0
|
||||
After Auto Save Hook, If non-0 is run just after auto saving: 0
|
||||
Auto Save Star, * If non-0, user wants * in mode line after auto-save: 0
|
||||
|
||||
|
||||
[1[2[3[4 0f[VB 0f[VZ !* Wide bounds.!
|
||||
|
||||
-qBuffer Index"e qBuffer filenamesu1' !* 1: buffer filenames!
|
||||
"# q:.b(+2)u1' !* ...!
|
||||
q1"e @ftNo auto save filenames. 0fsEchoActivew '
|
||||
|
||||
q1f[DFile !* set default to buffer filenames.!
|
||||
|
||||
!* Now figure what version to use.!
|
||||
|
||||
fsURead"n e[fne]' !* maybe push input file!
|
||||
1:< 1,er fsIFileu3 fsIFVersionu4 fsIFCDateu2 ec
|
||||
!* 3: Full filename of highest version.!
|
||||
!* 4: Its version number.!
|
||||
!* 2: Its creation date.!
|
||||
|
||||
q2-(0fo..qASav 3 File)"e !* Was an auto save version already.!
|
||||
q4fsDVersionw !* so save to that version again!
|
||||
fsDFileu1 !* ...!
|
||||
etASAVE OUTPUT' !* but open ASAVE.OUTPUT on TNX to!
|
||||
!* prevent a crash from leaving a zero!
|
||||
!* length file!
|
||||
>w !* end of errset!
|
||||
|
||||
qBefore Auto Save Hookf"nu2 m2'w !* Run before hook if non-0.!
|
||||
|
||||
fsUWrite"n e\fne^' !* maybe push output file!
|
||||
ei fsOFCDateu2 !* 2: Its creation date.!
|
||||
hp ef1 !* restore filenames to force EF to!
|
||||
!* rename, and write it out.!
|
||||
fsOFVersionf"gu:.b(+9) 1fsModeChange'w !* save actual version number!
|
||||
zu:.b(+5+6) !* Update size last read/saved.!
|
||||
fsOFileu1 !* 1: Auto save files full name.!
|
||||
q2u:.b(+8) !* Update buffer date field.!
|
||||
q2m.vASav 1 Filew !* Declare it an autosave file.!
|
||||
@ftAuto saved: 1
|
||||
!* tell user exact filename written!
|
||||
|
||||
qAfter Auto Save Hookf"nu1 m1'w !* Run after hook if non-0.!
|
||||
|
||||
0fsXModifiedw !* Lets not save it again.!
|
||||
qAuto Save Star"e 0fsModifiedw' !* if user wants star to go away, make it!
|
||||
!* go away!
|
||||
0fsEchoActivew
|
||||
|
||||
!^R Save File:! !^R Write out a user-save file if needs it.
|
||||
A user-save file is one written by user decision, and therefore never to
|
||||
be touched by auto saving. E.g. a high-level backup point.
|
||||
Declares this version to be a user-saved file, i.e. NOT an auto saved
|
||||
one. Thus, auto saving will not occur to this version again.
|
||||
Given an explicit NUMARG, we just run & Auto Save File, to ensure that the
|
||||
file is currently safe, if not user-level consistent: thus this will
|
||||
keep the file declared an auto save file.
|
||||
A NUMARG of 16 or greater calls & Auto Save All Buffers.!
|
||||
|
||||
-16:"l m(m.m& Auto Save All Buffers)w 1'
|
||||
:i*CfsEchoDis !* clear echo area!
|
||||
ff"g !* NUMARG.!
|
||||
fsXModified"e @ft(No changes need to be written)
|
||||
0fsEchoActivew 1' !* tell user buffer doesnt need changing!
|
||||
@ft(auto save)
|
||||
!* or tell him auto save started!
|
||||
qBuffer Indexm(m.m& Auto Save File) !* auto save current buffer!
|
||||
1' !* !
|
||||
|
||||
[1[2[3[4 f[DFile !* Should we be saving default?!
|
||||
0f[VB 0f[VZ !* Wide bounds.!
|
||||
qBuffer Filenamesf"ew :i*No filenames to save underfsErr
|
||||
'u1 !* 1: User-save filenames.!
|
||||
et1 !* Set default!
|
||||
q1u2 !* 2: Start with filename in case the!
|
||||
!* input below gives an error.!
|
||||
fsURead"n e[fne]' !* maybe push input file!
|
||||
1:< 1,er fsIFileu2 fsIFVersionu3 fsIFCDateu4 ec
|
||||
!* 2: Highest version filename.!
|
||||
!* 3: Its version number.!
|
||||
!* 4: Its creation date.!
|
||||
q4-(0fo..qASav 2 File)"e !* That is an auto save file.!
|
||||
q3fsDVersionw !* So re-use that version.!
|
||||
fsDFileu1 !* ...!
|
||||
etASAVE OUTPUT' !* on TNX, open different filename to!
|
||||
!* prevent a crash from leaving a zero!
|
||||
!* length file!
|
||||
|
||||
|
||||
q:.b(qBuffer Index+8)u3 !* read or wrote the file.!
|
||||
q4"n q3"n q4-q3"n !* If not, warn user he may be losing.!
|
||||
ftThis file has been written on disk since you last read or wrote it.
|
||||
Should I write it anyway
|
||||
m(m.m& Yes or No)(f 0u..h)"e 0''''
|
||||
>w
|
||||
|
||||
fsXModified"e @ft(No changes need to be written)
|
||||
'
|
||||
"# fsUWrite"n e\fne^' !* maybe push output file!
|
||||
ei fsOFCDateu3 !* 3: Its creation date.!
|
||||
hp ef1 !* restore filenames to force EF to!
|
||||
!* rename, and write it out.!
|
||||
fsOFVersionf"gu:.b(+9) 1fsModeChange'w !* save actual version number!
|
||||
zu:.b(qBuffer Index+5+6) !* Update size last read/saved.!
|
||||
fsOFileu2 !* 2: User save files full name.!
|
||||
q3u:.b(qBuffer Index+8) !* Update buffer date field.!
|
||||
@ftUser saved: 2
|
||||
|
||||
0fsXModifiedw' !* no longer needs auto saving!
|
||||
fs^RMDlyfs^RMCntw !* not even in near future!
|
||||
0fsModifiedw !* no longer needs user saving!
|
||||
|
||||
m(m.mKill Variable)ASav 2 Filew
|
||||
!* Remove any assertion that this was an auto save file. Note!
|
||||
!* that this is not conditional on fsModified since the buffer!
|
||||
!* may have just been written out due to an auto save.!
|
||||
!* However, we must at least declare that auto saved file to!
|
||||
!* now be a user saved file.!
|
||||
|
||||
0fsEchoActivew 1
|
||||
|
||||
!& Secretary Macro:! !S ..F: Auto save for use in ^R mode editing.
|
||||
The buffer is auto saved after every fs^RMDly characters.
|
||||
Auto saving happens by calling & Auto Save File.!
|
||||
!* I (ECC) think that Teco must be the one to reset fs^RMCnt, and it
|
||||
* does it after we are done -- and if we get an error it is not reset.
|
||||
* So if we are not careful if someone gets a write error (e.g. no
|
||||
* access) the ..F will go off again the very next character they type.
|
||||
* For now, until we have a better solution, I am having ..F reset
|
||||
* fs^RMCnt from fs^RMDly itself once it decides to call & Auto Save File.!
|
||||
|
||||
qBuffer Index[1 !* 1: index of current buffer!
|
||||
q:.b(q1+4)[..o !* Teco-select the current EMACS!
|
||||
!* buffer -- i.e. dont let any temp!
|
||||
!* teco buffers get in the way.!
|
||||
fsXModified"e 1' !* Buffer doesnt need saving.!
|
||||
q:.b(q1+10)"e 1' !* Not supposed to save it.!
|
||||
|
||||
:i*CfsEchoDis @ft(auto save)
|
||||
0fsEchoActivew !* tell user what we are up to.!
|
||||
fs^RMDlyfs^RMCntw !* Reset count before chance of bad error!
|
||||
q1m(m.m& Auto Save File) !* auto save current buffer!
|
||||
1
|
||||
|
||||
!& Auto Save All Buffers:! !S For each buffer that requires it.
|
||||
I.e. for each that is modified and has auto saving on.
|
||||
& Auto Save File is called.!
|
||||
|
||||
0[1 [2 -1[3 [..o !* 1: .B index, 3: saved count!
|
||||
< 1f<!Test! !* exit this if no auto save!
|
||||
q:.b(q1+10)@; !* exit if saving not desired!
|
||||
q:.b(q1+4)u..o !* Teco select buffer!
|
||||
fsXModified@; !* this buffer modified?!
|
||||
%3"e :i*CfsEchoDis @ft(auto save)
|
||||
0fsEchoActivew' !* tell user if first buffer!
|
||||
q1m(m.m& Auto Save File) !* yes, save buffer!
|
||||
> !* end auto save test catch!
|
||||
q1+q:.b(q1)u1 !* 1: move to next buffer slot.!
|
||||
q1-(fq.b/5); > !* Continue till done .B!
|
||||
|
||||
|
||||
!& Real-time Interrupt:! !S Save file after 5 minutes of idle time.!
|
||||
0fsTyiCount"n 0' !* User has been typing in last 5 minutes!
|
||||
!* so dont save -- this is an easy way of!
|
||||
!* avoiding possible messup of the screen!
|
||||
!* at funny times (like in & Read Line) or!
|
||||
!* to avoid being obnoxious to use and!
|
||||
!* saving the current buffer 2 characters!
|
||||
!* after it was just saved.!
|
||||
m(m.m& Auto Save All Buffers)
|
||||
0@v 0
|
||||
BIN
src/emacs1/dired.205
Executable file
BIN
src/emacs1/dired.205
Executable file
Binary file not shown.
316
src/emacs1/taggen.45
Executable file
316
src/emacs1/taggen.45
Executable file
@@ -0,0 +1,316 @@
|
||||
!*-*- Teco -*-*!
|
||||
|
||||
!~Filename~:! !Macros for supporting Emacs TAGS file setup!
|
||||
TAGGEN
|
||||
|
||||
!Generate Tags File:! !S Make updates to an existing TAGS file as needed
|
||||
Reads a string argument of a TAGS file to be updated. The file must be in
|
||||
standard tags file format... eg,
|
||||
<filename1>
|
||||
<digits>,<language>
|
||||
<optional-outdated-tags-text-which-may-extend-over-more-than-one-line>
|
||||
<control-underscore>
|
||||
<filename2>
|
||||
<digits>,<language>
|
||||
<optional-outdated-tags-text-which-may-extend-over-more-than-one-line>
|
||||
<control-underscore>
|
||||
...etc...
|
||||
!
|
||||
|
||||
f[dfile !* Bind Teco Default File !
|
||||
f[bbind !* Bind temp buffer !
|
||||
fsmsnamefsdsname !* Default file uses working dir !
|
||||
et FOO_TAGS !* Default fn1,fn2 is FOO TAGS !
|
||||
5,fTags_File[F !* Get filename in qF !
|
||||
etF !* Use defaults !
|
||||
e?"n :i*NSF No_Such_Filefserr' !* Err if no such file !
|
||||
er @y !* Yank file !
|
||||
|
||||
!* Purge stale data if any !
|
||||
|
||||
<.-z;2l.,(sr.)kl>j !* Delete cruft !
|
||||
|
||||
!* Process new tags stuff !
|
||||
|
||||
|
||||
[T[F[N[L[P[X !* qT = Main Tags Table Buffer !
|
||||
!* qF = Temp Filehacking Buffer !
|
||||
!* qN = Filename being hacked !
|
||||
!* qL = Language being hacked !
|
||||
!* qP = Point of file data start !
|
||||
!* qX = Random Temporary !
|
||||
|
||||
q..OuT !* Current buffer is qT !
|
||||
f[bbindw q..OuF !* Make new buffer for qF !
|
||||
qTu..O !* Get back tags buffer !
|
||||
<.-z; .uP !* Stop at end of tags buffer !
|
||||
1:xN !* Get filename into qN !
|
||||
l 1a"d \w 1a-,"e oGoodSyntax''
|
||||
:i*SYN Illegal_Syntax_in_Tags_File fserr
|
||||
!GoodSyntax! !* Come here if syntax correct !
|
||||
d 0k i00000, !* Insert 5 digits !
|
||||
1:xL !* Get language in qL !
|
||||
l !* Put cursor in position !
|
||||
qFu..O !* Get filehacking buffer !
|
||||
f[dfile !* Bind default file !
|
||||
e?N"n :i*FNF File_Not_Foundfserr'
|
||||
er@y !* Yank file into buffer !
|
||||
f]dfile !* Unbind default file !
|
||||
1,m.m &_Tags_Process_L_Bufferf"n[0
|
||||
qT m0 w ]0' !* Macro hook if exists !
|
||||
"#w :i*UTL Unknown_TAGS_Language:_"L"!''!fserr'
|
||||
hk qTu..O !* Get Tags buffer back !
|
||||
l .( .-qP:\uX fqX-5"g :i*FTL File_Too_Largefserr'
|
||||
qPj l 5d 5-fqX,0i gX !* Insert Number of chars to jump !
|
||||
)j !* Return where we started !
|
||||
> !* Loop getting more files !
|
||||
ew hp ef !* Write it out !
|
||||
qFu..O !* Set up for unwinding !
|
||||
!* Pop the world !
|
||||
|
||||
!& Tags Default Snarf:! !& Snarf start of line to point into arg buffer
|
||||
with a precomma arg, get arg1,point into arg2 buffer !
|
||||
|
||||
g( .( !* Get point !
|
||||
g( ff&2"n,.'"#0'x*( !* ... but first preceding cruft !
|
||||
[..O )) !* ... but first change buffer !
|
||||
i› !* ... and insert rubout !
|
||||
)) iî
|
||||
w !* Return !
|
||||
|
||||
|
||||
!& Tags Process LSPDOC Buffer:! !& Process tags for a buffer of Lisp doc !
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
<:sBegin-Entry:; !* Find entry starts !
|
||||
:l mS !* Snarf data !
|
||||
> !* Loop !
|
||||
!* Return !
|
||||
|
||||
!& Tags Process MAXDOC Buffer:! !& Process tags for a buffer of Macsyma doc !
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
:<:s&; !* Search for & not preceded by ^Q !
|
||||
fk+1+.,(@fll)mS !* Snarf data !
|
||||
> !* Loop !
|
||||
!* Return !
|
||||
|
||||
!& Tags Process BLISS Buffer:! !& Process tags for a buffer of BLISS code !
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
:<:S routine; !* Search for `routine` !
|
||||
fk+1+.,(fwl)mS> !* Snarf the data, looping !
|
||||
!* Return !
|
||||
|
||||
!& Tags Process Macsyma Buffer:! !& Process tags for a buffer of Macsyma code !
|
||||
|
||||
!* *!
|
||||
!* In MACSYMA code, a function definition is recognized when there is *!
|
||||
!* a symbol at the beginning of a line, terminated with a "(" or "[", *!
|
||||
!* and there is a ":" later on in the line. If the symbol itself is *!
|
||||
!* terminated with a ":", a variable definition is recognized. *!
|
||||
!* *!
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* S: Useful tagging macro !
|
||||
|
||||
[1 !* 1: Temp for holding old position !
|
||||
< .u1 !* q1 remembers this place !
|
||||
:s;$"\/*;!'!; !* Search for interesting chars !
|
||||
0a-* "e s*/ oEnd' !* Ignore comments !
|
||||
0a-"!'!"e r s\" !'! oEnd' !* Ignore strings !
|
||||
0a-\ "e c oEnd' !* Ignore \'d stuff !
|
||||
!<! !* Fake out Teco looper !
|
||||
q1,.( .u1 ):fb ::=:::==:=:=>"l
|
||||
!* Finally, find label for line !
|
||||
:l mS !* if it is there, snarf it !
|
||||
q1j' !* Move to end of field !
|
||||
!End! > !* End of loop !
|
||||
!* Return !
|
||||
|
||||
!& Tags Process LISP Buffer:! !& Process tags for a buffer of LISP code !
|
||||
|
||||
m.m &_Tags_Default_Snarf [S !* S: Useful tagging macro !
|
||||
0 [0 !* 0: Temp !
|
||||
:i*
|
||||
(DEF
|
||||
(SETQ [1 !* 1: Kinds of defs we seek !
|
||||
!* !
|
||||
j < :s(@DEFINE; !* Search for other stuff !
|
||||
-@fll .-1,( 2@fll ),mS !* Index that, too, just for fun !
|
||||
-@flx0 :i11
|
||||
(0 !* Get new @DEFINE thing to find !
|
||||
> !* Loop !
|
||||
!* !
|
||||
j < :s1; !* Search for one of these !
|
||||
-@fll 2@fll mS > !* and index it if found !
|
||||
!* !
|
||||
!* Return !
|
||||
|
||||
|
||||
!& Tags Process SCHEME Buffer:! !& Process tags for a buffer of Scheme code !
|
||||
|
||||
f:m(m.m &_Tags_Process_Lisp_Buffer) !* Go where we shoulda been !
|
||||
|
||||
|
||||
!& Tags Process TJ6 Buffer:! !& Process tags for a buffer of TJ6 code !
|
||||
|
||||
!* *!
|
||||
!* In TJ6 text, any line which starts with .C TAG starts a tag. The *!
|
||||
!* name of the tag is whatever follows the spaces which should follow the *!
|
||||
!* "C TAG", up to the next space or the end of the line. *!
|
||||
!* *!
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
<:s
|
||||
.C_TAG_; !* Find tags !
|
||||
@f_l :fb_"e :l' mS !* Snarf data !
|
||||
> !* Loop !
|
||||
!* Return !
|
||||
|
||||
|
||||
!& Tags Process MUDDLE Buffer:! !& Process tags in a buffer full of MDL code!
|
||||
|
||||
!* *!
|
||||
!* In MUDDLE code, a tag is identified by a line that starts with *!
|
||||
!* "<DEFINE " or "<DEFMAC ", followed by a symbol. *!
|
||||
!* *!
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
<:s
|
||||
<DEFINE_
|
||||
<DEFMAC_; !* Look for canonical definers !
|
||||
@fll mS !* Hop across the symbol and gobble tag !
|
||||
> !* Loop !
|
||||
!* Return !
|
||||
|
||||
|
||||
!& Tags Process TECO Buffer:! !& Process tags in a buffer full of Teco code!
|
||||
|
||||
!* *!
|
||||
!* In TECO code, a tag starts with an exclamation mark and ends with a *!
|
||||
!* colon followed by an exclamation mark. There may be any number of tags *!
|
||||
!* on a line, but the first one must start at the beginning of a line. *!
|
||||
!* *!
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
<:sî
|
||||
!; !* Search for ^L<return><excl> !
|
||||
<:fb:!; !* Search for <excl><colon> !
|
||||
:fb!"e :l 0; '> !* Hop across any number of tags !
|
||||
mS > !* Snarf, Loop, Return !
|
||||
|
||||
|
||||
!& Tags Process R Buffer:! !& Process tags in a buffer full of R code!
|
||||
|
||||
!* In R code, any line which starts with ".de" or ".am" or ".rtag" *!
|
||||
!* defines a tag. The name of the tag is what follows, up to the second *!
|
||||
!* run of spaces or the end of the line. There is no ".rtag" in R; *!
|
||||
!* define it to be a null macro, if you like, and use it to put in tags *!
|
||||
!* for chapters, or anything else. Any macro whose name starts with "de" *!
|
||||
!* or "am" or "rtag", such as ".define" or ".amplify", also defines a *!
|
||||
!* tag. *!
|
||||
!* *!
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
< :s
|
||||
.de
|
||||
.am
|
||||
.rtag; !* Find the tags !
|
||||
-fwl @fll @f_ l !* Skip spaces !
|
||||
:fb_"e :l ' !* Find next spaces set or end of line !
|
||||
mS !* Snarf the tag !
|
||||
> !* Loop and return !
|
||||
|
||||
|
||||
!& Tags Process MIDAS Buffer:! !& Process tags for buffer of MIDAS code!
|
||||
|
||||
!* *!
|
||||
!* In MIDAS code, a tag is any symbol that occurs at the beginning *!
|
||||
!* of a line and is terminated with a colon or =. Thus, MIDAS mode is *!
|
||||
!* good for MACRO-10 also. *!
|
||||
!* *!
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
<:s
|
||||
; r fwl !* Go over first token !
|
||||
1af:=:"l c mS' !* If token ends in : or =, take it !
|
||||
> !* Loop !
|
||||
!* Return !
|
||||
|
||||
|
||||
!& Tags Process MACRO Buffer:! !& Process tags for MACRO assembly language!
|
||||
|
||||
!* *!
|
||||
!* This is copied intact from the MIDAS code. *!
|
||||
!* *!
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
<:s
|
||||
; r fwl !* Go over first token !
|
||||
1af:=:"l c mS' !* If token ends in : or =, take it !
|
||||
> !* Loop !
|
||||
!* Return !
|
||||
|
||||
|
||||
!& Tags Process FAIL Buffer:! !& Process tags for FAIL assembly language!
|
||||
|
||||
!* *!
|
||||
!* FAIL code is like MIDAS code, except that one or two 's or "^"'s *!
|
||||
!* are allowed before a tag, and spaces are allowed between the tag name *!
|
||||
!* and the colon or =, and _ is recogniized as equivalent to =. *!
|
||||
!* *!
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
<:s
|
||||
|
||||
|
||||
^; !* Look for Linefeed + ^A, ^ or alpha !
|
||||
r @f^ l @fll @f_ l !* Go over first token !
|
||||
1af:=_:"l c mS' !* If it ends in a :, _, or =, take it !
|
||||
> !* Loop !
|
||||
!* Return !
|
||||
|
||||
|
||||
!& Tags Process TEXT Buffer:! !& Process tags in a buffer full of text!
|
||||
|
||||
!* Text buffers have no tags, BUT they are useful to have in tags tables for *!
|
||||
!* Emacs Tags Search mapping harmlessly through them ... *!
|
||||
|
||||
!* Just return !
|
||||
|
||||
|
||||
!& Tags Process PALX Buffer:! !& Process tags in a buffer full of PALX code!
|
||||
|
||||
!* *!
|
||||
!* PALX code is like MIDAS code, except that spaces are allowed between *!
|
||||
!* a tag and the following colon or equals, and local tags such as "10$" *!
|
||||
!* are ignored. *!
|
||||
!* *!
|
||||
|
||||
m.m &_Tags_Default_Snarf[S !* Get temp !
|
||||
<:s
|
||||
; r fwl !* Go over first token !
|
||||
0a-$"n !* If not a $ tag !
|
||||
@f_ l !* Go over any whitespace !
|
||||
1af:=:"l c mS'' !* If token ends in : or =, take it !
|
||||
> !* Loop and return !
|
||||
|
||||
|
||||
!Make Tags File:! !S Make a skeleton tags file for other routines to fill in.
|
||||
Asks for output filename (the new TAGS file), and a list of (possibly wild)
|
||||
input filespecs. Terminate list by typing just CR.
|
||||
!
|
||||
|
||||
[0 [1 [2 [3 [4 !* Save q-regs!
|
||||
f[ D File !* Save default filespec!
|
||||
f[ B Bind !* Scratch buffer!
|
||||
f6TAGS fs d fn2 !* Default ext is tags!
|
||||
:i*Output_tag_file:_,400001.:et !* Get output filespec!
|
||||
:g(fs d file)u4 q4u1 !* Save it!
|
||||
f6 | ||||