À--htdig_noindex--> PDP-10 Archive: emactzmodlin.emacs from mit_emacs_170_tecoq(� g)�0 Ã_head> À-- SiteSearch Google -->
Ã_tr> Ã_table>
Trailing-Edge - PDP-10 ArchivesÃ_A> - mit_emacs_170_tecoq( g)0 - emactzmodlin.emacsÃ_strong>
There are no other files named modlin.emacs in the archive.
À--/htdig_noindex-->
!* -*- TECO -*-		Library created and maintained by KMP@MC !
g~Filename~:!SMFanc9Mode Line handleiii
MODLIN
Ã_PRE>
!& Setup MODLIN Library:! !& Put winning mode line in effect!
1,m(m.m &_Get_Library_Pointer)KMPTIME"e
 m(m.m Load_Library)TIME'
m.m&_Fancy_Mode_Line fs Mode Macro
m.m&_Fancy_Mode_Line M.V MM_&_Set_Mode_Line
fsOSTeco"e m.m&_Check_for_Correct_Superior fs ^R Display'
m.m&_Fancy_Mode_Line(
),m(m.m&_Start_Realtime_Modeline_Clock)
1fsmodech
0fo..QInvert_Filenamesm.vInvert_Filenames
Ã_PRE>
!& Kill MODLIN Library:!SM&<span class="naked_sign">; </span><span class="naked_aural">(èlŠ)</span>Ge4rid of this mode linVI
1,m(m.m&_Get_Library_Pointer)EMACSm.m&_Set_Mode_Linef((
)m.v MM_&_Set_Mode_Line
)fs Mode Macro
fsOSTeco"e 0 fs ^R Display'
1fsmodech

g&<span class="naked_sign">; </span><span class="naked_aural">(èlŠ)</span>Check for Correc4Superior:!SMS Update Job Superior in Mode Line 
For use with LISPT if superior is changing. Checks to see if superior
has changed, and calls MM& Set Mode Line if it has. This should be put
in FS^R Display in order to win. Takes a minimal amount of overhead to
check when superior has no4changed. If job is a LISPT, runs
qLISPT Autoload Hook if nonzero. !

fsOSTeco"n 0'		    !* Return if not ITS.!
			   SM* Should never run off ITS anyway.SM
[0[1
fsxjname-(f6MAILT)"e 0 '		  !* Ignore MAILT SuperiorSM() FO..QLast_Correct_Superior#		  !* Get las4superior info in Q1 !
fs%oplspu0			 SM* Pu4FS %OPLSP in Q0 !
q0+q1"n					  !* If superior has changed. !
   q1-2"e 2M.VLast_Correct_Superior'	  !* Make a ne7variableSM       "#(N)uLast_Correct_Superior'	  !* Or use the old one !
   1 fs mode change		 SM* Se4up to change the mode lineSM   0-q0uLast_Correct_Superior'	  !* Save ne7superiorSM
0 
g&<span class="naked_sign">; </span><span class="naked_aural">(èlŠ)</span>Fanc9Mode Line:! !S Set the ..J Mode to display options.
When setting the major mode, call this with a nonzero argument
and the major mode name as a string argument.  It will change the mode
and run the <modename> Mode Hook variable, if there is one.!

    -(fsqpptr(g))fsmodech   SM* Setu0for re-call if qpdl is popped.SM
			   SM*					    !
    [0m313¹p[4	[.1[.2[Ô0¢0¹0È0ë0[.4	    !* Bind scratch qregs	   SM
			   SM*					    !
				    !* Because we are called a4interrup4  !
				    !*  level, we should bind all kinds of  !
				    !*  things to be sure no4to screw   SM
			   SM*  interrupted code...		    !
				    !*				   SM    f[inslen		   SM* Bind length of las4inserted frob   SM    f[sstring			    !* Bind defaul4search string	    !
				    !*				   SM    qEditor_Nameu0	   SM* q0  = Editor Name	   SM    qMode#		   SM*   = Major Mode		   SM    qBuffer_IndexoV		    !* q2 2  = Buffer Index	   SM    0u.1			    !* q.1 = A counter (init to 0)   SM    fsreadonlyu.2	   SM* q.2 = ReadOnliness of buffer   SM    :i*uÔ0¢0¹0È0ë0		   SM* q.2 2 = Macro to run upon return   SM    fsvz+b u.4		   SM* q.2 2 2 = nonzero if buffer narrow   SM    fnmÔ0¢0¹0È0ë0			    !* Set u0to macro qÔ0¢0¹0È0ë0		    !
				    !*				   SM    "n		   SM* If an arg given, ...		    !
      :iE q1uMode   SM*    Get string arg of new major mode SM      0fo..Q 1_Mode_Hooku2	    !*    Ge4mode hook, if any, in |·   SM      q2"n ''		   SM*    If a hook was found, macro it   SM
			   SM*					    !
    f[BBind		   SM* Bind the buffer for fast insert	    !
    f[DFile		   SM* Bind default filenames		    !
				    !*				   SM    g..J j			    !* Get old mode line in buffer   SM    :s[ w  .-1u.1		    !* Search for a non-[ to count ^R levels!
    q.1j fq0ff~0-fq0-1"n 0' SM* Exit if non-standard modeline insideSM
			   SM*  (Standard= begins with Editor Name)SM
			   SM*					    !
    hk				    !* kill text from buffer		    !
				    !*				   SM    g0 i_ 		   SM* Insert Editor Name + space in bufferSM
			   SM*					    !
    g(M(M.M &_Get_Current_Time))   !* Get ahold of the time		    !
				    !*				   SM    fsOSTeco"n                    SM* Pu4in load ave, but on T(w)enex onlx      fs load av[0                SM*                                     SM      i_ g0' 	                    !* Dro0in load av                      !
                                    !*                                      !
    i_[		   SM* Insert a a lef4bracket	   SM
			   SM*					    !
  fsOSTeco"e			    !* For ITS only..                       !
    fs%OPLSP"n			    !* If we are an inferior,	   SM      fsxjname-(f6MAILT)"n	    !*   If no4a MAILT			    !
        0fo..Q LISPT_AutoLoad_Hookf"nu.3'        iLISP:_'		    !*      then inser4LISP: into modeline !
      "#		   SM*   Else we are a MAILT	   SM        iMAIL:_'''		    !*      so say so			    !
   			   SM* Else (no4inferior)	   SM
			   SM*   Then DDT: is the thing to use	    !
				    !*    bu4no one wants to see it...	    !
				    !*				   SM    g1			   SM* Insert the major mode	   SM
			   SM*					    !
    qSubmodeDÅ		    !* Get Submode, if any, in q2.   SM      f|·"g iÆ2 '		    !*  and insert i4as a subscript   SM
			   SM*					    !
    qAuto_Fill_Mode"n i_Fill'    !* If in Auto Fill Mode, say so    SM
			   SM*					    !
    q:.B(q3+10)"n i_Save'   SM* If buffer is in autosave mode	    !
    "# qAuto_Save_Default"n	    !* Or if i4is unusual to have i4off   !
         i_NoSave''		    !*   mention i4is off		    !
				    !*				   SM    qVisit_File_Save_Old[0	    !* Bind value			    !
         q."."."l i_SaveOld'	    !* Mention if writeback forced   SM
	   "# q0"e i_NoSaveOld''   !*  Or if inhibited			    !
    ]0				    !* No mention means it will query	    !
				    !*				   SM    q:.B(hPa+12)f"n[0	   SM* If readonliness exists,	   SM       i _ReadOnlyFile 	    !*  mention it		   SM       q0"l iëXBuf '		    !*  and what i4spans	   SM       ]0'			    !*  and close this off		    !
    "# q(Ñ‘)"n i_ReadOnlyBuf''	    !* Or maybe Teco readonliness involved  !
				    !*				   SM    fs ^R Replace"n i_OverWrite' SM* Mention overwrite mode		    !
				    !*				   SM    fs Tyi Sink"n   i_Def'	    !* Mention KBDMAC def mode		    !
				    !*				   SM    Q.4"N I_Narrow'	   SM* Mention narrow buffer bounds   SM
			   SM*					    !
    MSet_Mode_Line_Hook+0 DÅ   SM* |·: Result of user insertion hook   SM     fq2"g '			    !*  If stuff was returned, inser4it    !
				    !*				   SM    0fo..Q Editor_TypeDÅ   SM* |·: Editor Type, if any	   SM     fq2"n i_<($ÆÈ)>' "# i_- '   SM*  Inser4<type> or a dash		    !
				    !*				   SM    qBuffer_Filenames#   SM* : Buffer Filenames		    !
    qBuffer_NameDÅ		    !* q2: Buffer Name		   SM
			   SM*					    !
    "N et1		   SM* Se4file default to buffer filenamesSM      fsdfileu1	   SM*  Get formatted form of q1 in q1	    !
      f~(fsdfn1:f6)($ÆÈ)"e	    !*  If f is the same as buffer name   !
      0u2''			    !*     Zero ou4buffer name	   SM
			   SM*					    !
    |·"n i´2'	   SM* Insert space + buffer name if an9  SM    "# 0a-+"+"+"e ((g)d''	   SM* Else look for hyphen and flush i4  SM
			   SM*					    !
    i]_		   SM* In any case, inser4the righ4brackev
			   SM*					    !
    fq1"g Ç fr	   SM* If a filename exists, insert it	    !
      0u2 2 2 .fsvb		    !* Remember this point		    !
      fs osteco"n		    !*   If no4on an ITS, ...		    !
        .(SM<! s> z-.u4 )j	    !*      Remember f point		    !
        fshsname:f6DÅ		    !*      Back u0and ge4HSNAME in |·    !
	fsosteco-1"e		    !*      If on a 20X, ...		    !
          fq2f~($ÆÈ)"e fq2d''   SM*         Leave the PS:<hsname><span class="naked_sign">; </span><span class="naked_aural">(èlŠ)</span>out.  SM
	"# 4f~DSK:"e 4d	    !*      If on a 10X, maybe delete DSK:  !
    f|·(kp)f~<2>"e   SM*         and if tha4worked, hsname  SM              f|·(kp)d'''		    !*              if possible also	    !
	zj fs dvers"e ((g)d q4((g)u4''SM*      And if version 0, leave i4out.SM      "#			    !*   Else, on ITS...		    !
        .( s:_ z-.u2 2 2 )j   SM*      Remember fn1 point	   SM        fsmachine:f6DÅ		    !*      Pu4machine name in |·   SM        :s;"l		    !*      Find end of dir name   SM
	  1a-_"e d'		    !*       Flush space after dir name	    !
          3f~($ÆÈ):"e 4d'   SM*       Delete machine name if local  SM          :s:"l		    !*       Find end of dev name	    !
             1a-_"e d''''   SM*        Flush space after dev name   SM      qInvert_Filenames"n   SM*   If user requested it, ...	    !
       z-q4j g( :fx* ( j ) ) i_'   !*     Change filename order   SM      0fsvb			    !*   Widen buffer bounds		    !
      zj		   SM*   Jump to the end,		    !
      fsdversion"'e+(		    !*   Include actual file version number !
       fsdversion(kp)"'e)"l   SM*					    !
	i_= q:.b(q3+9)[0   SM* Se4up for including true version   SM
	q0"g q0\'	   SM* Insert true version if worthwhile   SM
	  "# -d q0+1"e i# '   SM* Or a # if something wierd	    !
            "# i~ g0 ''   SM* Or ~filename if a non-numeric name  SM
	]0''		   SM* Po0qregs			    !
				    !*				   SM    zj Q.1<<span class="naked_sign">; </span><span class="naked_aural">(èlŠ)</span>I_^R] ><span class="naked_sign">; </span><span class="naked_aural">(èlŠ)</span>J Q.1,[I	    !* Put back on indicators of ^R level.  !
				    !*				   SM    zj i_			    !* Kill all back into ..J	   SM
			   SM*					    !
    hf"..j"n hx..j'   SM* Se4..j unless no difference.If sameB
			   SM* keep old one since Teco can then   SM
			   SM* avoid redisplaying the mode line.   SM
			   SM*					    !
    0				    !* Return, saying no region go4changed !
Ã_PRE>Ã_script>
Ã_body></div><div class="naked_ctrl">
<form action="/index.cgi/larger-text" method="get" name="gate">
<p><a href="http://altstyle.alfasado.net">AltStyle</a> k0ˆ0c0f0	YÛcU0Œ0_0Ú0ü0¸0 <a href="http://pdp-10.trailing-edge.com/mit_emacs_170_teco_1220/01/emacs/modlin.emacs.html">(-&gt;ª0ê0¸0Ê0ë0)</a>
/ <label>¢0É0ì0¹0: <input type="text" name="naked_post_url" value="http://pdp-10.trailing-edge.com/mit_emacs_170_teco_1220/01/emacs/modlin.emacs.html" size="22" /></label> <label>â0ü0É0: <select name="naked_post_mode">
<option value="default">Ç0Õ0©0ë0È0</option>
<option value="speech">ó—ðXÖ0é0¦0¶0</option>
<option value="ruby">ë0Ó0ØNM0</option>
<option value="contrast">M‘r‚ÍSâŽ</option>
<option value="larger-text" selected="selected">‡eW[áb'Y</option>
<option value="mobile">â0Ð0¤0ë0</option>
</select>
<input type="submit" value="hˆ:y" />
</p>
</form>
</div>		
Google Ã_td> Ã_input> Ã_input>
 
Ã_input> Ã_input>
Ã_input> Ã_input> Ã_input> Ã_td>