À--htdig_noindex--> PDP-10 Archive: emactztimer.emacs from mit_emacsq70_teco_(�*h)�20Ã_title> <link rel="stylesheet" TYPE="text/css" HREF="/css/pre.css" TITLE="Default"> </head><body> <!-- SiteSearch Google --> <form method="get" action="httpsa_/www.google.coÛwcustom" target="_top"> <table border="."."." bgcolor="#ffffff"> <tr><td nowrap="nowrap" valign="top" align="left" height="(�>y)�"> <a href="https:å]www.google.com."."> <img src="https:å]www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle">Ã_img>Ã_a> </td> <td nowrap="nowrap"> <input type="hidden" name="domains" value="pdp-10.trailing-edge.com"></input> <label for="sbi" style="display: none">Enter your search termsÃ_label> <inpu4�type="text" name="q" size=»0ó0Á01" maxlength="255" value="" id="sbi"></input> <label for="sbb" style="display: none">Submi4�search form</label> <input type="submit" name="sa" value="Search" id="sbb"></input> Ã_td></tr> <tr> <td> Ã_td> <td nowrap="nowrap"> <table> <tr> <td> <inpu4�type="radio" name="sitesearch" value="" checked id="ss."."."></input> <label for="ss."."." title="Search the Web"><fon4�size="-1" color="#000000">Web</font>Ã_label>Ã_td> <td> <inpu4�type="radio" name="sitesearch" value="pdp-10.trailing-edge.com" id="ss1"></input> <label for="ss1" title="Search pdp-10.trailing-edge.com"><font size="-1" color="#00000.".".">pdp-10.trailing-edge.com</font>Ã_label>Ã_td> Ã_tr> Ã_table> <inpu4�type="hidden" name="client" value="pub-0(� g)�099936(�´R)�05Õ0£0ü0È09"></input> <input type="hidden" name="forid" value="1">Ã_input> <inpu4�type="hidden" name="ie" value="ISO-8859-1"></input> <input type="hidden" name="oe" value="ISO-8859-1">Ã_input> <inpu4�type="hidden" name="cof" value="GALT:#00AS00;GL:1;DIV:»0ó0È036699;VLC:66Õ0£0ü0È099;AH:center;BGC:FFFFFF;LBGCÚ0ó0¹036699;ALC:0000FF;LC:0000FF;TES00000;GFNTES000FF;GIMPES000FF;FORID:1"></input> <input type="hidden" name="hl" value="en">Ã_input> </td>Ã_tr></table> Ã_form> À-- SiteSearch Google --> <hr> <strong><a href="httpa_/www.trailing-edge.com.".">Trailing-EdgeÃ_A> - <a href="httpa_/pdp-10.trailing-edge.coÛw">PDP-10 Archives</a> - <a href="http:å]pdp-10.trailing-edge.com/mit_emacsq70_teco_(�*h)�20/index.html">mit_emacsq70_teco_(�*h)�20Ã_A> - emacs/timer.emacsÃ_strong> <hr> There are no other files named timer.emacs in the archive.<hr><!-q\htdig_noindex--><pre“* Librar9�created and maintained b9�David Eppstein <Kronj@Sierra><�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�! !* Compile this file with IVORY, not PURIFY ! !* The funny name is to trick MODLIN into no4�loading TIMES�M� !~Filename~:! !Intelligent real-time clock interrupti�v� KMPTIME </pre><pre>g�&<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�Setu0�KMPTIME Library:! !S Setup for using our winning macroi�v� fsClkIntm.vTimer Old Clock Int !* Save old clock interval! fsClkMacm.vTimer Old Clock Mac !* And old clock mac! 0fsClkInt !* No interrupts set yet! m.m&<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�Run TimersfsClkMac � S�M�* Se4�macro to run timeri�v� 0fo..qOnl9�Time in Modelinef"nm.vTime Only' � S�M�* Placate LOTS loseri�v� �0fsQVectorm.vTimer Vector !* Make up a new timer vectoi�i�i� �0uTimer Vector Locked !* Timer Vector has no4�been lockeV� �m(m.m& Auto Save Timer) � S�M�* Auto save to schedule for latei�i�i� 0fo..qMonths"n ' � S�M�* If we have months already, donV�I� �Ó0ë0*5fsQVectorf([5)m.vMonths !* Get ourselves a Q-vector ! :i*Jan u:5(1) !* JaD� �:i*Feb u:5(2) � S�M�* Feb! :i*Mar u:5Ê0Î0) !* Mai�i�i� �:i*Apr u:5(4) � S�M�* Apr! :i*May u:5(5) !* Max� �:i*Jun u:5(6) � S�M�* Jun! :i*Jul u:5(7) !* JuL� �:i*Aug u:5(8) � S�M�* Aug! :i*Sep u:5(9) !* Sei� �:i*Oct u:5(10) � S�M�* Oct! :i*Nov u:5(11) !* Nov�i�i� �:i*Dec u:5((�*h)�) � S�M�* Dec!  Ã_PRE><pre> !& Kill KMPTIME Library:! !S Fix u0�so user can run withou4�us! �qTimer Old Clock IntfsClkInt S�M�* Fi8�clock interval! qTimer Old Clock MacfsClkMac !* And macro to run when alarm goes ofV�I�I� �0uTimer Vector !* No timer vector anymore!  Ã_PRE><pre> !& Run Timers:! !S Macro to check list of timers for later interpretatioD� m(m.m&<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�Declare Load-Time Defaults) � Timer Vector Locked,Lock On Timer Interrupts: 0 � Timer Lock Timeout,Ho7�long to wait before trying lock again:µ0ó0Á0ü0à000  qTimer Vector Locked"n !* Is timer locked  � qTimer Lock TimeoutfsClkInt S�M�* Yes, wai4�a little (5 seconds default)! ' !* Before doing anything! �qTimer Vector[0 � S�M�* Ge4�vector! fq0:"g 0fsClkIntw' � S�M�* If nothing, don'4�run interrupv� 0m fq0/53�1� qES(0)[3 � S�M�* Ge4�index, limit, decremenv� �<-q2; qES(q1)-q3uES(q1) q1+2u1><�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�S�M�* Decremen4�all timeou4�counters! �< fq0@; qES(0)-1; !* Loo0�through all zeroed counti�v� � m:0(1) � S�M�* Macro the macrM� � q0[..o 0,10k ]..o > !* And flush tha4�timeouv� fq0f"nw qES(0)'fsClkInt !* Set new timeout for nex4�interrupv�  !* All done with this alarC� </pre><pre>g�&<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�Se4�Timer:! !S Schedule a timer interrup4�for later running. Arg1 is interval (in 0ths of a second), Ar  is macro to run.! m(m.m&<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�Declare Load-Time Defaults) � Timer Vector Locked,Lock On Timer Interrupts: 0  1[Timer Vector Locked � S�M�* Lock timer vector from interrupt! qTimer Vector[..o !* Selec4�vector as buffer! 0[0 fq..o/5m � S�M�* Ge4�inde8�and length of vector! <q0-<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�q:..o(q0)-; q0+2u0> !* Find place to put new interrupt! q0*5j 10,0i � S�M�* Make some room! u:..o(q0) u:..o(q0+1) � S�M�* Se4�timeou4�and macrM� �q0"e fsClkInt' !* If firs4�in line, set u0�timei�i�i� � � S�M�* Exit and unlock things! Ã_PRE><pre> !& Clear Timer:!S�M�S Remove timer from schedule. Arg is macro tha4�would have been run.! �m(m.m& Declare Load-Time Defaults) Timer Vector Locked,Lock On Timer Interrupts: 0  �1[Timer Vector Locked °�F�* Lock timer vector from interrupt! qTimer Vector[..o °�F�* Select vector as buffei�i�i� �0[0 fq..ñ]5[1 °�F�* Ge4�inde8�and length of vector! <q0-<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�q:..o(q0+1)-"e °�F�* Loop through. If we found the spov� � q0*5j 10�k'"# q0+2u0'> !* Flush it, else go on to nexv� � !* Exi4�and unlock thingi�v� </pre><pre>g�&<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�Auto Save Timer:! !S Timer interrupt for auto save. Schedules self for later running and runs auto save.! �m(m.m& Declare Load-Time Defaults) Auto Save Timeout,Interval between auta-save interrupts: 14400  qAuto Save Timeout,(m.m&<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�Auto Save Timer)m(m.m&<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�Se4�Timer) !* ...! :m(m.m& Real-time Interrupt) � S�M�* Run original auta-save macro! Ã_PRE><pre> !& Get Current Time:! !S Gets string form of time. Time in 7 chars + <Space> + Date in 9 chars; if qTime Only is nonzero, the just return time in 5 5 5 chars.! �m(m.m& Declare Load-Time Defaults) Time Only,* Just time withou4�date in fanc9�mode line: 0  !* q0 = String to pu4�in mode line! !* q1 = full time (scrap)!g�* q5 = datV�I� [0[1[2[3[4[5 !* Save some qregs for use! :i5 � S�M�* Initialize q5 to null string! qTime Only[6 !* Get whether to include date! �fsDate+1"e !* If system doesn't kno7�the time! q6"n :i*No Time' � S�M�* ..then say sM� � "# :i*No Time &<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�No Date'' !* ...! �fsDate:fsFDConvert# !* Save date/time as string in qF� �q6"n oSkipDate' !* If no4�doing date, then go on! �3,5:Ç u2 !* Get day in |·! 0(�4l)�:g1 o�V� � S�M�* Ge4�month # in qM� �6,8:Ç u4 !* Get year in qo� �Q:Months(3) u3 � S�M�* Ge4�month string in h�P�a�! 0:g2-48"e � S�M�* Leading zero in Day?! 0:F(�)� ' !* Change to a space! :i5(�$ÆÈ)� 2 2 4 � S�M�* Month Date! �!SkipDatV�I� � S�M�* Come here if no date wanteV� 12,14:g1 DÅ � S�M�* Save minutes in |·! 9,�:g1 o�V� � S�M�* Save hour in qM� F(�O)�00"e !* If its on the hour ...! � FÝ0¤0ó0È000"e :i*Midnite 5 ' S�M�* Hour = 0 means midnitV�I� � FÝ0¤0ó0È0(�*h)�"e :i*12 Noon 5 '' S�M�* Hour = (�*h)� means nooD� z^(�*h)�"e � S�M�* If before noon, ...! � :i4am' � S�M�* Then Use am! "# (3-(�*h)�):\u3 � S�M�* Else pu4�(Hour - (�*h)�) in qM� � fh�P�a�-1"e :1�7�¹p 3' � S�M�* If onl9�one digit, slide ovei�i�i� � :i4pm' � S�M�* Use pm! �F=2 2 0"e :1�7�¹p(�*h)�' !* If Hour = 0, change to 12! �"# FÝ0¤0ó0È000"e :iª2'' !* (Else) If Hour = 00, change to (�*h)�! �0:1�5�¹p-48"e !* If Hour begins with a 0, ...! � 0:F2 2 ' � S�M�* Make it into a blanX�I�I� q6"e :i*3:(�$ÆÈ)�4 5 ' !* Return the Time and DatV�I� � "# :i*³0ë0Ê0N�Ž4 ' !* or maybe jus4�the Time! Ã_PRE><pre> !& Start Realtime Modeline Clock:!S�M�S Ge4�the realtime clock interrupts going Postcomma arg is the number of seconds to wait between updates (Defaul4�30). Precomma arg is time will onl9�f^E the mode line when tha4�macro is in ModeMaI�V� m.vModeline Safe Macro !* Precomma arg (default 0) is safe to f^E! ff&1"n*60m.vMode Line Timeout' !* If given a time, use it! :m(m.m& Inser4�Correc4�Time in Mode Line) !* Start u0�mode macro! Ã_PRE><pre> !& Inser4�Correc4�Time In Mode Line:! !S Updates modline display of time! �m(m.m& Declare Load-Time Defaults) Mode Line Timeout,Ho7�long to wait between mode line updates: 1800  qMode Line Timeout,( � S�M�* Se4�self to run again latei�i�i� � m.m&<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�>�; <�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(�èlŠ)�<�/�s�p�a�n�>�Insert Correct Time In Mode Line)m(m.m& Set Timer) � S�M�* ...! 1,M.M &_Periodic_Action"n !* Satisfy users of MODLIN! M(M.M &_Periodic_Action)' !* who wan4�other things donV�I� � f[InsLen � S�M�* Bind inser4�length infM� �qEditor Name[0 !* Put Editor name in q0! �!* Check whether can inser4�time without worrying abou4�rest of modeline! f~..J0-1-FQ."."."N oSet' � S�M�* If ..J is unknown, Set mode line! fq..J-(fq0+18)"l oSet' � S�M�* If ..J is short, same thinV�I�I�I� �qModeline Safe Macrof"n[0 !* If a mode safe macro was nameV� � q0-(]07�fsModeMacro)"n oSet'' S�M�* ..do the f^E onl9�if a match! �!* Can do insertion, so do iv� �:iD�..J � S�M�* Copy ..J into q0! M(M.M & Get Current Time)[1 !* Get current time in qF� �fqEditor Name+1:fD�1 � S�M�* Replace time into mode linV�I� �F=D�..J"e 0' !* Exi4�if no change to make! q0 u..J � S�M�* Pu4�ne7�mode line in ..J! FR � S�M�* Redispla9�the mode linV�I� �0 !* ReturD� S�M�Sev� !* Here when have to run full mode macro! fsModeMacrof"n[0 m0fr ]0' !* If a ModeMacro in effect, call it! 0 � S�M�* And return! Ã_PRE><scrip4�defer src="httpsa_/static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f491�1�¹p99c6a5babf(� g)�u2417176876015" integrity="sha5(�*h)�-ZpsOmlRQV6yDS7TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqȹft8M1a2�3�8oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon='{"version":(� N)�(�åe)�4.�.0","token":"f9dÕ0¡0é0Ã0É0fdfdbee4b63814Ø0¯0¿0ü0ë0984a2a355aa"+"+"r"°+"+"server_timing":{"name":{"cfCacheStatus":true+"+"cfEdge":true+"+"cfExtPri":true+"+"cfL4":true+"+"cfOrigin":true+"+"cfSpeedBrain":trueV�"location_startswith":null}}' crossorigin="anonymous">Ã_script> Ã_body></html><�/�d�i�v�>�<�d�i�v� �c�l�a�s�s�=�"�n�a�k�e�d�_�c�t�r�l�"�>� �<�f�o�r�m� �a�c�t�i�o�n�=�"�/�i�n�d�e�x�.�c�g�i�/�l�a�r�g�e�r�-�t�e�x�t�"� �m�e�t�h�o�d�=�"�g�e�t�"� �n�a�m�e�=�"�g�a�t�e�"�>� �<�p�>�<�a� �h�r�e�f�=�"�h�t�t�p�:�/�/�a�l�t�s�t�y�l�e�.�a�l�f�a�s�a�d�o�.�n�e�t�"�>�A�l�t�S�t�y�l�e�<�/�a�>� �k0ˆ0c0f0 YÛcU0Œ0_0Ú0ü0¸0 �<�a� �h�r�e�f�=�"�h�t�t�p�:�/�/�p�d�p�-�1�0�.�t�r�a�i�l�i�n�g�-�e�d�g�e�.�c�o�m�/�m�i�t�_�e�m�a�c�s�_�1�7�0�_�t�e�c�o�_�1�2�2�0�/�0�1�/�e�m�a�c�s�/�t�i�m�e�r�.�e�m�a�c�s�.�h�t�m�l�"�>�(�-�&�g�t�;�ª0ê0¸0Ê0ë0)�<�/�a�>� �/� �<�l�a�b�e�l�>�¢0É0ì0¹0:� �<�i�n�p�u�t� �t�y�p�e�=�"�t�e�x�t�"� �n�a�m�e�=�"�n�a�k�e�d�_�p�o�s�t�_�u�r�l�"� �v�a�l�u�e�=�"�h�t�t�p�:�/�/�p�d�p�-�1�0�.�t�r�a�i�l�i�n�g�-�e�d�g�e�.�c�o�m�/�m�i�t�_�e�m�a�c�s�_�1�7�0�_�t�e�c�o�_�1�2�2�0�/�0�1�/�e�m�a�c�s�/�t�i�m�e�r�.�e�m�a�c�s�.�h�t�m�l�"� �s�i�z�e�=�"�2�2�"� �/�>�<�/�l�a�b�e�l�>� �<�l�a�b�e�l�>�â0ü0É0:� �<�s�e�l�e�c�t� �n�a�m�e�=�"�n�a�k�e�d�_�p�o�s�t�_�m�o�d�e�"�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�d�e�f�a�u�l�t�"�>�Ç0Õ0©0ë0È0<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�s�p�e�e�c�h�"�>�ó—ðXÖ0é0¦0¶0<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�r�u�b�y�"�>�ë0Ó0ØNM0<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�c�o�n�t�r�a�s�t�"�>�M‘r‚ÍSâŽ<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�l�a�r�g�e�r�-�t�e�x�t�"� �s�e�l�e�c�t�e�d�=�"�s�e�l�e�c�t�e�d�"�>�‡eW[áb'Y<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�m�o�b�i�l�e�"�>�â0Ð0¤0ë0<�/�o�p�t�i�o�n�>� �<�/�s�e�l�e�c�t�>� �<�i�n�p�u�t� �t�y�p�e�=�"�s�u�b�m�i�t�"� �v�a�l�u�e�=�"�hˆ:y"� �/�>� �<�/�p�>� �<�/�f�o�r�m�>� �<�/�d�i�v�>� � � �