home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1992-08-29 | 4.9 KB |
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
100%
| file
| Emacs v18 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| gt2
| Kopftext: '(defvar calendar-hook nil '
| default (weak)
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 28 64 65 66 76 61 72 | 20 63 61 6c 65 6e 64 61 |.(defvar| calenda|
|00000010| 72 2d 68 6f 6f 6b 20 6e | 69 6c 20 22 5c 0a 4c 69 |r-hook n|il "\.Li|
|00000020| 73 74 20 6f 66 20 66 75 | 6e 63 74 69 6f 6e 73 20 |st of fu|nctions |
|00000030| 63 61 6c 6c 65 64 20 61 | 66 74 65 72 20 74 68 65 |called a|fter the|
|00000040| 20 63 61 6c 65 6e 64 61 | 72 20 62 75 66 66 65 72 | calenda|r buffer|
|00000050| 20 68 61 73 20 62 65 65 | 6e 20 70 72 65 70 61 72 | has bee|n prepar|
|00000060| 65 64 20 77 69 74 68 0a | 74 68 65 20 63 61 6c 65 |ed with.|the cale|
|00000070| 6e 64 61 72 20 6f 66 20 | 74 68 65 20 63 75 72 72 |ndar of |the curr|
|00000080| 65 6e 74 20 6d 6f 6e 74 | 68 2e 20 20 54 68 69 73 |ent mont|h. This|
|00000090| 20 63 61 6e 20 62 65 20 | 75 73 65 64 2c 20 66 6f | can be |used, fo|
|000000a0| 72 20 65 78 61 6d 70 6c | 65 2c 20 74 6f 20 68 69 |r exampl|e, to hi|
|000000b0| 67 68 6c 69 67 68 74 0a | 74 6f 64 61 79 27 73 20 |ghlight.|today's |
|000000c0| 64 61 74 65 20 77 69 74 | 68 20 61 73 74 65 72 69 |date wit|h asteri|
|000000d0| 73 6b 73 2d 2d 61 20 66 | 75 6e 63 74 69 6f 6e 20 |sks--a f|unction |
|000000e0| 73 74 61 72 2d 64 61 74 | 65 20 69 73 20 69 6e 63 |star-dat|e is inc|
|000000f0| 6c 75 64 65 64 20 66 6f | 72 20 74 68 69 73 20 70 |luded fo|r this p|
|00000100| 75 72 70 6f 73 65 2e 0a | 54 68 65 20 76 61 72 69 |urpose..|The vari|
|00000110| 61 62 6c 65 20 6f 66 66 | 73 65 74 2d 63 61 6c 65 |able off|set-cale|
|00000120| 6e 64 61 72 2d 68 6f 6f | 6b 20 69 73 20 74 68 65 |ndar-hoo|k is the|
|00000130| 20 6c 69 73 74 20 6f 66 | 20 66 75 6e 63 74 69 6f | list of| functio|
|00000140| 6e 73 20 63 61 6c 6c 65 | 64 20 77 68 65 6e 20 74 |ns calle|d when t|
|00000150| 68 65 0a 63 61 6c 65 6e | 64 61 72 20 66 75 6e 63 |he.calen|dar func|
|00000160| 74 69 6f 6e 20 77 61 73 | 20 63 61 6c 6c 65 64 20 |tion was| called |
|00000170| 66 6f 72 20 61 20 70 61 | 73 74 20 6f 72 20 66 75 |for a pa|st or fu|
|00000180| 74 75 72 65 20 6d 6f 6e | 74 68 2e 22 29 0a 0a 28 |ture mon|th.")..(|
|00000190| 64 65 66 76 61 72 20 6f | 66 66 73 65 74 2d 63 61 |defvar o|ffset-ca|
|000001a0| 6c 65 6e 64 61 72 2d 68 | 6f 6f 6b 20 6e 69 6c 20 |lendar-h|ook nil |
|000001b0| 22 5c 0a 4c 69 73 74 20 | 6f 66 20 66 75 6e 63 74 |"\.List |of funct|
|000001c0| 69 6f 6e 73 20 63 61 6c | 6c 65 64 20 61 66 74 65 |ions cal|led afte|
|000001d0| 72 20 74 68 65 20 63 61 | 6c 65 6e 64 61 72 20 62 |r the ca|lendar b|
|000001e0| 75 66 66 65 72 20 68 61 | 73 20 62 65 65 6e 20 70 |uffer ha|s been p|
|000001f0| 72 65 70 61 72 65 64 20 | 77 69 74 68 0a 74 68 65 |repared |with.the|
|00000200| 20 63 61 6c 65 6e 64 61 | 72 20 6f 66 20 61 20 70 | calenda|r of a p|
|00000210| 61 73 74 20 6f 72 20 66 | 75 74 75 72 65 20 6d 6f |ast or f|uture mo|
|00000220| 6e 74 68 2e 20 20 54 68 | 65 20 76 61 72 69 61 62 |nth. Th|e variab|
|00000230| 6c 65 20 63 61 6c 65 6e | 64 61 72 2d 68 6f 6f 6b |le calen|dar-hook|
|00000240| 20 69 73 20 74 68 65 0a | 6c 69 73 74 20 6f 66 20 | is the.|list of |
|00000250| 66 75 6e 63 74 69 6f 6e | 73 20 63 61 6c 6c 65 64 |function|s called|
|00000260| 20 77 68 65 6e 20 74 68 | 65 20 63 61 6c 65 6e 64 | when th|e calend|
|00000270| 61 72 20 66 75 6e 63 74 | 69 6f 6e 20 77 61 73 20 |ar funct|ion was |
|00000280| 63 61 6c 6c 65 64 20 66 | 6f 72 20 74 68 65 0a 63 |called f|or the.c|
|00000290| 75 72 72 65 6e 74 20 6d | 6f 6e 74 68 2e 22 29 0a |urrent m|onth.").|
|000002a0| 0a 28 64 65 66 75 6e 20 | 63 61 6c 65 6e 64 61 72 |.(defun |calendar|
|000002b0| 20 28 26 6f 70 74 69 6f | 6e 61 6c 20 6d 6f 6e 74 | (&optio|nal mont|
|000002c0| 68 2d 6f 66 66 73 65 74 | 29 20 22 5c 0a 44 69 73 |h-offset|) "\.Dis|
|000002d0| 70 6c 61 79 20 74 68 72 | 65 65 2d 6d 6f 6e 74 68 |play thr|ee-month|
|000002e0| 20 63 61 6c 65 6e 64 61 | 72 20 69 6e 20 61 6e 6f | calenda|r in ano|
|000002f0| 74 68 65 72 20 77 69 6e | 64 6f 77 2e 0a 54 68 65 |ther win|dow..The|
|00000300| 20 74 68 72 65 65 20 6d | 6f 6e 74 68 73 20 61 70 | three m|onths ap|
|00000310| 70 65 61 72 20 73 69 64 | 65 20 62 79 20 73 69 64 |pear sid|e by sid|
|00000320| 65 2c 20 77 69 74 68 20 | 74 68 65 20 63 75 72 72 |e, with |the curr|
|00000330| 65 6e 74 20 6d 6f 6e 74 | 68 20 69 6e 20 74 68 65 |ent mont|h in the|
|00000340| 20 6d 69 64 64 6c 65 0a | 73 75 72 72 6f 75 6e 64 | middle.|surround|
|00000350| 65 64 20 62 79 20 74 68 | 65 20 70 72 65 76 69 6f |ed by th|e previo|
|00000360| 75 73 20 61 6e 64 20 6e | 65 78 74 20 6d 6f 6e 74 |us and n|ext mont|
|00000370| 68 73 2e 20 20 54 68 65 | 20 63 75 72 73 6f 72 20 |hs. The| cursor |
|00000380| 69 73 20 70 75 74 20 6f | 6e 20 74 6f 64 61 79 27 |is put o|n today'|
|00000390| 73 20 64 61 74 65 2e 0a | 0a 41 6e 20 6f 70 74 69 |s date..|.An opti|
|000003a0| 6f 6e 61 6c 20 70 72 65 | 66 69 78 20 61 72 67 75 |onal pre|fix argu|
|000003b0| 6d 65 6e 74 20 41 52 47 | 20 63 61 75 73 65 73 20 |ment ARG| causes |
|000003c0| 74 68 65 20 63 61 6c 65 | 6e 64 61 72 20 64 69 73 |the cale|ndar dis|
|000003d0| 70 6c 61 79 65 64 20 74 | 6f 20 62 65 0a 41 52 47 |played t|o be.ARG|
|000003e0| 20 6d 6f 6e 74 68 73 20 | 69 6e 20 74 68 65 20 66 | months |in the f|
|000003f0| 75 74 75 72 65 20 69 66 | 20 41 52 47 20 69 73 20 |uture if| ARG is |
|00000400| 70 6f 73 69 74 69 76 65 | 20 6f 72 20 69 6e 20 74 |positive| or in t|
|00000410| 68 65 20 70 61 73 74 20 | 69 66 20 41 52 47 20 69 |he past |if ARG i|
|00000420| 73 0a 6e 65 67 61 74 69 | 76 65 3b 20 69 6e 20 74 |s.negati|ve; in t|
|00000430| 68 69 73 20 63 61 73 65 | 20 74 68 65 20 63 75 72 |his case| the cur|
|00000440| 73 6f 72 20 67 6f 65 73 | 20 6f 6e 20 74 68 65 20 |sor goes| on the |
|00000450| 66 69 72 73 74 20 64 61 | 79 20 6f 66 20 74 68 65 |first da|y of the|
|00000460| 20 6d 6f 6e 74 68 2e 0a | 0a 54 68 65 20 47 72 65 | month..|.The Gre|
|00000470| 67 6f 72 69 61 6e 20 63 | 61 6c 65 6e 64 61 72 20 |gorian c|alendar |
|00000480| 69 73 20 61 73 73 75 6d | 65 64 2e 0a 0a 41 66 74 |is assum|ed...Aft|
|00000490| 65 72 20 70 72 65 70 61 | 72 69 6e 67 20 74 68 65 |er prepa|ring the|
|000004a0| 20 63 61 6c 65 6e 64 61 | 72 20 77 69 6e 64 6f 77 | calenda|r window|
|000004b0| 2c 20 74 68 65 20 68 6f | 6f 6b 73 20 63 61 6c 65 |, the ho|oks cale|
|000004c0| 6e 64 61 72 2d 68 6f 6f | 6b 20 61 72 65 20 72 75 |ndar-hoo|k are ru|
|000004d0| 6e 0a 77 68 65 6e 20 74 | 68 65 20 63 61 6c 65 6e |n.when t|he calen|
|000004e0| 64 61 72 20 69 73 20 66 | 6f 72 20 74 68 65 20 63 |dar is f|or the c|
|000004f0| 75 72 72 65 6e 74 20 6d | 6f 6e 74 68 2d 2d 74 68 |urrent m|onth--th|
|00000500| 61 74 20 69 73 2c 20 74 | 68 65 20 77 61 73 20 6e |at is, t|he was n|
|00000510| 6f 20 70 72 65 66 69 78 | 0a 61 72 67 75 6d 65 6e |o prefix|.argumen|
|00000520| 74 2e 20 20 49 66 20 74 | 68 65 20 63 61 6c 65 6e |t. If t|he calen|
|00000530| 64 61 72 20 69 73 20 66 | 6f 72 20 61 20 66 75 74 |dar is f|or a fut|
|00000540| 75 72 65 20 6f 72 20 70 | 61 73 74 20 6d 6f 6e 74 |ure or p|ast mont|
|00000550| 68 2d 2d 74 68 61 74 20 | 69 73 2c 20 74 68 65 72 |h--that |is, ther|
|00000560| 65 0a 77 61 73 20 61 20 | 70 72 65 66 69 78 20 61 |e.was a |prefix a|
|00000570| 72 67 75 6d 65 6e 74 2d | 2d 74 68 65 20 68 6f 6f |rgument-|-the hoo|
|00000580| 6b 73 20 6f 66 66 73 65 | 74 2d 63 61 6c 65 6e 64 |ks offse|t-calend|
|00000590| 61 72 2d 68 6f 6f 6b 20 | 61 72 65 20 72 75 6e 2e |ar-hook |are run.|
|000005a0| 20 20 54 68 75 73 2c 20 | 66 6f 72 0a 65 78 61 6d | Thus, |for.exam|
|000005b0| 70 6c 65 2c 20 73 65 74 | 74 69 6e 67 20 63 61 6c |ple, set|ting cal|
|000005c0| 65 6e 64 61 72 2d 68 6f | 6f 6b 73 20 74 6f 20 27 |endar-ho|oks to '|
|000005d0| 73 74 61 72 2d 64 61 74 | 65 20 77 69 6c 6c 20 63 |star-dat|e will c|
|000005e0| 61 75 73 65 20 74 6f 64 | 61 79 27 73 20 64 61 74 |ause tod|ay's dat|
|000005f0| 65 20 74 6f 20 62 65 0a | 72 65 70 6c 61 63 65 64 |e to be.|replaced|
|00000600| 20 62 79 20 61 73 74 65 | 72 69 73 6b 73 20 74 6f | by aste|risks to|
|00000610| 20 68 69 67 68 6c 69 67 | 68 74 20 69 74 20 69 6e | highlig|ht it in|
|00000620| 20 74 68 65 20 77 69 6e | 64 6f 77 2e 22 20 28 69 | the win|dow." (i|
|00000630| 6e 74 65 72 61 63 74 69 | 76 65 20 22 50 22 29 20 |nteracti|ve "P") |
|00000640| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c4 88 08 85 |(byte-co|de "....|
|00000650| 0b 00 cd 08 21 89 10 88 | ce 20 19 8a cf d0 21 71 |....!...|. ....!q|
|00000660| 88 c3 89 12 88 c4 1a d1 | 20 1d d2 d3 0d 5c 22 1e |........| ....\".|
|00000670| 06 08 85 29 00 d4 86 36 | 00 d5 0d d6 d7 21 d8 d7 |...)...6|.....!..|
|00000680| 21 4f 21 1e 07 d9 0d d6 | d4 21 d8 d4 21 4f da 5c |!O!.....|.!..!O.\|
|00000690| 22 41 1e 08 d5 0d d6 db | 21 d8 db 21 4f 21 1e 09 |"A......|!..!O!..|
|000006a0| dc 20 88 08 85 7b 00 dd | 0e 09 de 5c 22 0e 08 d4 |. ...{..|...\"...|
|000006b0| 5a 5c 5c 08 5c 5c 1e 0a | df 0e 0a de 5c 22 d4 5c |Z\\.\\..|....\".\|
|000006c0| 5c 89 16 08 88 e0 0e 0a | de 5c 22 89 16 09 29 88 |\.......|.\"...).|
|000006d0| e1 0e 08 d4 55 83 88 00 | de 82 8b 00 0e 08 53 0e |....U...|......S.|
|000006e0| 08 d4 55 83 98 00 0e 09 | 53 82 9a 00 0e 09 e2 23 |..U.....|S......#|
|000006f0| 88 65 62 88 e3 09 e1 0e | 08 0e 09 e4 0e 07 24 5c |.eb.....|......$\|
|00000700| 22 88 65 62 88 e1 0e 08 | de 55 83 bc 00 d4 82 bf |".eb....|.U......|
|00000710| 00 0e 08 54 0e 08 de 55 | 83 cc 00 0e 09 54 82 ce |...T...U|.....T..|
|00000720| 00 0e 09 e5 23 2e 06 29 | 88 e6 d0 21 88 e7 09 21 |....#..)|...!...!|
|00000730| 62 88 e3 09 c4 5c 22 29 | 88 e8 20 53 e9 65 64 5c |b....\")|.. S.ed\|
|00000740| 22 1e 0c 1e 0b e8 ea 20 | 21 e8 eb 20 21 5c 5c ec |"...... |!.. !\\.|
|00000750| 20 55 86 0c 01 0e 0b 0e | 0c 58 86 0c 01 ed 0e 0b | U......|.X......|
|00000760| 0e 0c 5a 21 2a 88 08 83 | 18 01 ee ef 21 82 1b 01 |..Z!*...|....!...|
|00000770| ee f0 21 87 22 20 5b 6d | 6f 6e 74 68 2d 6f 66 66 |..!." [m|onth-off|
|00000780| 73 65 74 20 74 6f 64 61 | 79 20 62 75 66 66 65 72 |set toda|y buffer|
|00000790| 2d 72 65 61 64 2d 6f 6e | 6c 79 20 74 20 6e 69 6c |-read-on|ly t nil|
|000007a0| 20 64 61 74 65 20 67 61 | 72 62 61 67 65 20 64 61 | date ga|rbage da|
|000007b0| 79 20 6d 6f 6e 74 68 20 | 79 65 61 72 20 79 65 61 |y month |year yea|
|000007c0| 72 2d 6d 6f 6e 74 68 20 | 68 20 6c 20 70 72 65 66 |r-month |h l pref|
|000007d0| 69 78 2d 6e 75 6d 65 72 | 69 63 2d 76 61 6c 75 65 |ix-numer|ic-value|
|000007e0| 20 6d 61 6b 65 2d 6d 61 | 72 6b 65 72 20 67 65 74 | make-ma|rker get|
|000007f0| 2d 62 75 66 66 65 72 2d | 63 72 65 61 74 65 20 22 |-buffer-|create "|
|00000800| 2a 43 61 6c 65 6e 64 61 | 72 2a 22 20 63 75 72 72 |*Calenda|r*" curr|
|00000810| 65 6e 74 2d 74 69 6d 65 | 2d 73 74 72 69 6e 67 20 |ent-time|-string |
|00000820| 73 74 72 69 6e 67 2d 6d | 61 74 63 68 20 22 20 5c |string-m|atch " \|
|00000830| 5c 28 5b 41 2d 5a 5d 5b | 61 2d 7a 5d 5b 61 2d 7a |\([A-Z][|a-z][a-z|
|00000840| 5d 5c 5c 29 20 2a 5c 5c | 28 5b 30 2d 39 5d 2a 5c |]\\) *\\|([0-9]*\|
|00000850| 5c 29 20 2e 2a 20 5c 5c | 28 5b 30 2d 39 5d 2a 5c |\) .* \\|([0-9]*\|
|00000860| 5c 29 24 22 20 31 20 73 | 74 72 69 6e 67 2d 74 6f |\)$" 1 s|tring-to|
|00000870| 2d 69 6e 74 20 6d 61 74 | 63 68 2d 62 65 67 69 6e |-int mat|ch-begin|
|00000880| 6e 69 6e 67 20 32 20 6d | 61 74 63 68 2d 65 6e 64 |ning 2 m|atch-end|
|00000890| 20 61 73 73 6f 63 20 28 | 28 22 4a 61 6e 22 20 2e | assoc (|("Jan" .|
|000008a0| 20 31 29 20 28 22 46 65 | 62 22 20 2e 20 32 29 20 | 1) ("Fe|b" . 2) |
|000008b0| 28 22 4d 61 72 22 20 2e | 20 33 29 20 28 22 41 70 |("Mar" .| 3) ("Ap|
|000008c0| 72 22 20 2e 20 34 29 20 | 28 22 4d 61 79 22 20 2e |r" . 4) |("May" .|
|000008d0| 20 35 29 20 28 22 4a 75 | 6e 22 20 2e 20 36 29 20 | 5) ("Ju|n" . 6) |
|000008e0| 28 22 4a 75 6c 22 20 2e | 20 37 29 20 28 22 41 75 |("Jul" .| 7) ("Au|
|000008f0| 67 22 20 2e 20 38 29 20 | 28 22 53 65 70 22 20 2e |g" . 8) |("Sep" .|
|00000900| 20 39 29 20 28 22 4f 63 | 74 22 20 2e 20 31 30 29 | 9) ("Oc|t" . 10)|
|00000910| 20 28 22 4e 6f 76 22 20 | 2e 20 31 31 29 20 28 22 | ("Nov" |. 11) ("|
|00000920| 44 65 63 22 20 2e 20 31 | 32 29 29 20 33 20 65 72 |Dec" . 1|2)) 3 er|
|00000930| 61 73 65 2d 62 75 66 66 | 65 72 20 2a 20 31 32 20 |ase-buff|er * 12 |
|00000940| 25 20 2f 20 67 65 6e 65 | 72 61 74 65 2d 6d 6f 6e |% / gene|rate-mon|
|00000950| 74 68 20 30 20 73 65 74 | 2d 6d 61 72 6b 65 72 20 |th 0 set|-marker |
|00000960| 32 34 20 34 38 20 70 6f | 70 2d 74 6f 2d 62 75 66 |24 48 po|p-to-buf|
|00000970| 66 65 72 20 6d 61 72 6b | 65 72 2d 70 6f 73 69 74 |fer mark|er-posit|
|00000980| 69 6f 6e 20 77 69 6e 64 | 6f 77 2d 68 65 69 67 68 |ion wind|ow-heigh|
|00000990| 74 20 63 6f 75 6e 74 2d | 6c 69 6e 65 73 20 73 65 |t count-|lines se|
|000009a0| 6c 65 63 74 65 64 2d 77 | 69 6e 64 6f 77 20 6d 69 |lected-w|indow mi|
|000009b0| 6e 69 62 75 66 66 65 72 | 2d 77 69 6e 64 6f 77 20 |nibuffer|-window |
|000009c0| 73 63 72 65 65 6e 2d 68 | 65 69 67 68 74 20 73 68 |screen-h|eight sh|
|000009d0| 72 69 6e 6b 2d 77 69 6e | 64 6f 77 20 72 75 6e 2d |rink-win|dow run-|
|000009e0| 68 6f 6f 6b 73 20 6f 66 | 66 73 65 74 2d 63 61 6c |hooks of|fset-cal|
|000009f0| 65 6e 64 61 72 2d 68 6f | 6f 6b 20 63 61 6c 65 6e |endar-ho|ok calen|
|00000a00| 64 61 72 2d 68 6f 6f 6b | 5d 20 33 36 29 29 0a 0a |dar-hook|] 36))..|
|00000a10| 28 64 65 66 75 6e 20 6c | 65 61 70 2d 79 65 61 72 |(defun l|eap-year|
|00000a20| 2d 70 20 28 79 65 61 72 | 29 20 22 5c 0a 52 65 74 |-p (year|) "\.Ret|
|00000a30| 75 72 6e 73 20 74 72 75 | 65 20 69 66 20 59 45 41 |urns tru|e if YEA|
|00000a40| 52 20 69 73 20 61 20 47 | 72 65 67 6f 72 69 61 6e |R is a G|regorian|
|00000a50| 20 6c 65 61 70 20 79 65 | 61 72 2c 20 61 6e 64 20 | leap ye|ar, and |
|00000a60| 66 61 6c 73 65 20 69 66 | 20 6e 6f 74 2e 22 20 28 |false if| not." (|
|00000a70| 62 79 74 65 2d 63 6f 64 | 65 20 22 c1 08 c2 5c 22 |byte-cod|e "...\"|
|00000a80| c3 55 85 10 00 c4 c1 08 | c5 5c 22 c3 5c 22 86 19 |.U......|.\".\"..|
|00000a90| 00 c1 08 c6 5c 22 c3 55 | 87 22 20 5b 79 65 61 72 |....\".U|." [year|
|00000aa0| 20 25 20 34 20 30 20 2f | 3d 20 31 30 30 20 34 30 | % 4 0 /|= 100 40|
|00000ab0| 30 5d 20 36 29 29 0a 0a | 28 64 65 66 75 6e 20 64 |0] 6))..|(defun d|
|00000ac0| 61 79 2d 6e 75 6d 62 65 | 72 20 28 6d 6f 6e 74 68 |ay-numbe|r (month|
|00000ad0| 20 64 61 79 20 79 65 61 | 72 29 20 22 5c 0a 52 65 | day yea|r) "\.Re|
|00000ae0| 74 75 72 6e 20 64 61 79 | 2d 6e 75 6d 62 65 72 20 |turn day|-number |
|00000af0| 77 69 74 68 69 6e 20 79 | 65 61 72 20 28 6f 72 69 |within y|ear (ori|
|00000b00| 67 69 6e 2d 31 29 20 6f | 66 20 74 68 65 20 64 61 |gin-1) o|f the da|
|00000b10| 74 65 20 4d 4f 4e 54 48 | 20 44 41 59 20 59 45 41 |te MONTH| DAY YEA|
|00000b20| 52 2e 0a 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |R..For e|xample, |
|00000b30| 28 64 61 79 2d 6e 75 6d | 62 65 72 20 31 20 31 20 |(day-num|ber 1 1 |
|00000b40| 31 39 38 37 29 20 72 65 | 74 75 72 6e 73 20 74 68 |1987) re|turns th|
|00000b50| 65 20 76 61 6c 75 65 20 | 31 2c 0a 77 68 69 6c 65 |e value |1,.while|
|00000b60| 20 28 64 61 79 2d 6e 75 | 6d 62 65 72 20 31 32 20 | (day-nu|mber 12 |
|00000b70| 33 31 20 31 39 38 30 29 | 20 72 65 74 75 72 6e 73 |31 1980)| returns|
|00000b80| 20 33 36 36 2e 22 20 28 | 62 79 74 65 2d 63 6f 64 | 366." (|byte-cod|
|00000b90| 65 20 22 09 c4 c5 0a 53 | 5c 22 5c 5c 18 0a c6 56 |e "....S|\"\\...V|
|00000ba0| 85 26 00 08 c7 c8 c4 c9 | 0a 5c 22 5c 5c ca 5c 22 |.&......|.\"\\.\"|
|00000bb0| 5a 89 10 88 cb 0b 21 85 | 26 00 08 54 89 10 88 08 |Z.....!.|&..T....|
|00000bc0| 29 87 22 20 5b 64 61 79 | 2d 6f 66 2d 79 65 61 72 |)." [day|-of-year|
|00000bd0| 20 64 61 79 20 6d 6f 6e | 74 68 20 79 65 61 72 20 | day mon|th year |
|00000be0| 2a 20 33 31 20 32 20 2f | 20 32 33 20 34 20 31 30 |* 31 2 /| 23 4 10|
|00000bf0| 20 6c 65 61 70 2d 79 65 | 61 72 2d 70 5d 20 37 29 | leap-ye|ar-p] 7)|
|00000c00| 29 0a 0a 28 64 65 66 75 | 6e 20 64 61 79 2d 6f 66 |)..(defu|n day-of|
|00000c10| 2d 77 65 65 6b 20 28 6d | 6f 6e 74 68 20 64 61 79 |-week (m|onth day|
|00000c20| 20 79 65 61 72 29 20 22 | 5c 0a 52 65 74 75 72 6e | year) "|\.Return|
|00000c30| 73 20 74 68 65 20 64 61 | 79 2d 6f 66 2d 74 68 65 |s the da|y-of-the|
|00000c40| 2d 77 65 65 6b 20 69 6e | 64 65 78 20 6f 66 20 4d |-week in|dex of M|
|00000c50| 4f 4e 54 48 20 44 41 59 | 2c 20 59 45 41 52 2e 0a |ONTH DAY|, YEAR..|
|00000c60| 56 61 6c 75 65 20 69 73 | 20 30 20 66 6f 72 20 53 |Value is| 0 for S|
|00000c70| 75 6e 64 61 79 2c 20 31 | 20 66 6f 72 20 4d 6f 6e |unday, 1| for Mon|
|00000c80| 64 61 79 2c 20 65 74 63 | 2e 22 20 28 62 79 74 65 |day, etc|." (byte|
|00000c90| 2d 63 6f 64 65 20 22 c4 | c5 c6 08 09 0a 23 c7 c8 |-code ".|.....#..|
|00000ca0| 0a 53 5c 22 c9 0a 53 ca | 5c 22 23 c7 c9 0a 53 cb |.S\"..S.|\"#...S.|
|00000cb0| 5c 22 cc 5c 22 1b c4 0b | ca 5c 22 cd 55 83 2b 00 |\".\"...|.\".U.+.|
|00000cc0| c9 0b ca 5c 22 82 30 00 | c9 0b ca 5c 22 54 29 5a |...\".0.|...\"T)Z|
|00000cd0| ce 5c 22 87 22 20 5b 6d | 6f 6e 74 68 20 64 61 79 |.\"." [m|onth day|
|00000ce0| 20 79 65 61 72 20 63 6f | 72 72 65 63 74 69 6f 6e | year co|rrection|
|00000cf0| 20 25 20 2b 20 64 61 79 | 2d 6e 75 6d 62 65 72 20 | % + day|-number |
|00000d00| 2a 20 33 36 35 20 2f 20 | 34 20 31 30 30 20 33 20 |* 365 / |4 100 3 |
|00000d10| 30 20 37 5d 20 31 33 29 | 29 0a 0a 28 64 65 66 75 |0 7] 13)|)..(defu|
|00000d20| 6e 20 67 65 6e 65 72 61 | 74 65 2d 6d 6f 6e 74 68 |n genera|te-month|
|00000d30| 20 28 6d 6f 6e 74 68 20 | 79 65 61 72 20 69 6e 64 | (month |year ind|
|00000d40| 65 6e 74 20 26 6f 70 74 | 69 6f 6e 61 6c 20 64 61 |ent &opt|ional da|
|00000d50| 79 29 20 22 5c 0a 50 72 | 6f 64 75 63 65 20 61 20 |y) "\.Pr|oduce a |
|00000d60| 63 61 6c 65 6e 64 61 72 | 20 66 6f 72 20 4d 4f 4e |calendar| for MON|
|00000d70| 54 48 2c 20 59 45 41 52 | 20 6f 6e 20 74 68 65 20 |TH, YEAR| on the |
|00000d80| 47 72 65 67 6f 72 69 61 | 6e 20 63 61 6c 65 6e 64 |Gregoria|n calend|
|00000d90| 61 72 2c 20 69 6e 73 65 | 72 74 65 64 0a 69 6e 20 |ar, inse|rted.in |
|00000da0| 74 68 65 20 62 75 66 66 | 65 72 20 73 74 61 72 74 |the buff|er start|
|00000db0| 69 6e 67 20 61 74 20 74 | 68 65 20 6c 69 6e 65 20 |ing at t|he line |
|00000dc0| 6f 6e 20 77 68 69 63 68 | 20 70 6f 69 6e 74 20 69 |on which| point i|
|00000dd0| 73 20 63 75 72 72 65 6e | 74 6c 79 20 6c 6f 63 61 |s curren|tly loca|
|00000de0| 74 65 64 2c 20 62 75 74 | 0a 69 6e 64 65 6e 74 65 |ted, but|.indente|
|00000df0| 64 20 49 4e 44 45 4e 54 | 20 73 70 61 63 65 73 2e |d INDENT| spaces.|
|00000e00| 20 20 54 68 65 20 70 6f | 73 69 74 69 6f 6e 20 69 | The po|sition i|
|00000e10| 6e 20 74 68 65 20 62 75 | 66 66 65 72 20 6f 66 20 |n the bu|ffer of |
|00000e20| 74 68 65 20 6f 70 74 69 | 6f 6e 61 6c 0a 70 61 72 |the opti|onal.par|
|00000e30| 61 6d 65 74 65 72 20 44 | 41 59 20 69 73 20 72 65 |ameter D|AY is re|
|00000e40| 74 75 72 6e 65 64 2e 20 | 20 54 68 65 20 69 6e 64 |turned. | The ind|
|00000e50| 65 6e 74 61 74 69 6f 6e | 20 69 73 20 64 6f 6e 65 |entation| is done|
|00000e60| 20 66 72 6f 6d 20 74 68 | 65 20 66 69 72 73 74 0a | from th|e first.|
|00000e70| 63 68 61 72 61 63 74 65 | 72 20 6f 6e 20 74 68 65 |characte|r on the|
|00000e80| 20 6c 69 6e 65 20 61 6e | 64 20 64 6f 65 73 20 6e | line an|d does n|
|00000e90| 6f 74 20 64 69 73 74 75 | 72 62 20 74 68 65 20 66 |ot distu|rb the f|
|00000ea0| 69 72 73 74 20 49 4e 44 | 45 4e 54 20 63 68 61 72 |irst IND|ENT char|
|00000eb0| 61 63 74 65 72 73 20 6f | 6e 0a 74 68 65 20 6c 69 |acters o|n.the li|
|00000ec0| 6e 65 2e 22 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |ne." (by|te-code |
|00000ed0| 22 cc 09 cd 0a 23 18 ce | 08 5a 1b cf 0a 21 85 13 |"....#..|.Z...!..|
|00000ee0| 00 09 d0 55 83 1a 00 d1 | 82 1e 00 d2 09 53 48 1c |...U....|.....SH.|
|00000ef0| d3 09 53 48 1d d4 d5 d6 | 0d 0a 23 0e 06 c7 23 88 |..SH....|..#...#.|
|00000f00| d4 d7 0e 06 c7 23 88 d4 | d8 0e 06 5c 22 88 d9 1e |.....#..|...\"...|
|00000f10| 08 0e 08 54 89 16 08 08 | 58 85 50 00 da 63 88 82 |...T....|X.P..c..|
|00000f20| 3f 00 29 88 d9 ca 1e 09 | 1e 08 0e 08 54 89 16 08 |?.).....|....T...|
|00000f30| 0c 58 85 a4 00 d5 db 0e | 08 5c 22 63 88 0e 0b 85 |.X......|.\"c....|
|00000f40| 7d 00 0e 08 0e 0b 55 85 | 7d 00 60 d0 5a 89 16 09 |}.....U.|}.`.Z...|
|00000f50| 88 dc 0e 08 ce 5c 22 dc | 0b ce 5c 22 55 85 a0 00 |.....\".|..\"U...|
|00000f60| dd 0e 08 0c 5c 22 85 a0 | 00 d4 d8 d9 c7 23 85 a0 |....\"..|.....#..|
|00000f70| 00 d4 d8 0e 06 5c 22 88 | 82 58 00 88 0e 09 2a 2c |.....\".|.X....*,|
|00000f80| 87 22 20 5b 66 69 72 73 | 74 2d 64 61 79 2d 6f 66 |." [firs|t-day-of|
|00000f90| 2d 6d 6f 6e 74 68 20 6d | 6f 6e 74 68 20 79 65 61 |-month m|onth yea|
|00000fa0| 72 20 66 69 72 73 74 2d | 73 61 74 75 72 64 61 79 |r first-|saturday|
|00000fb0| 20 6c 61 73 74 2d 6f 66 | 2d 6d 6f 6e 74 68 20 6d | last-of|-month m|
|00000fc0| 6f 6e 74 68 2d 6e 61 6d | 65 20 69 6e 64 65 6e 74 |onth-nam|e indent|
|00000fd0| 20 74 20 69 20 64 61 79 | 2d 6d 61 72 6b 65 72 20 | t i day|-marker |
|00000fe0| 6e 69 6c 20 64 61 79 20 | 64 61 79 2d 6f 66 2d 77 |nil day |day-of-w|
|00000ff0| 65 65 6b 20 31 20 37 20 | 6c 65 61 70 2d 79 65 61 |eek 1 7 |leap-yea|
|00001000| 72 2d 70 20 32 20 32 39 | 20 5b 33 31 20 32 38 20 |r-p 2 29| [31 28 |
|00001010| 33 31 20 33 30 20 33 31 | 20 33 30 20 33 31 20 33 |31 30 31| 30 31 3|
|00001020| 31 20 33 30 20 33 31 20 | 33 30 20 33 31 5d 20 5b |1 30 31 |30 31] [|
|00001030| 22 4a 61 6e 75 61 72 79 | 22 20 22 46 65 62 72 75 |"January|" "Febru|
|00001040| 61 72 79 22 20 22 4d 61 | 72 63 68 22 20 22 41 70 |ary" "Ma|rch" "Ap|
|00001050| 72 69 6c 22 20 22 4d 61 | 79 22 20 22 4a 75 6e 65 |ril" "Ma|y" "June|
|00001060| 22 20 22 4a 75 6c 79 22 | 20 22 41 75 67 75 73 74 |" "July"| "August|
|00001070| 22 20 22 53 65 70 74 65 | 6d 62 65 72 22 20 22 4f |" "Septe|mber" "O|
|00001080| 63 74 6f 62 65 72 22 20 | 22 4e 6f 76 65 6d 62 65 |ctober" |"Novembe|
|00001090| 72 22 20 22 44 65 63 65 | 6d 62 65 72 22 5d 20 69 |r" "Dece|mber"] i|
|000010a0| 6e 73 65 72 74 2d 69 6e | 64 65 6e 74 65 64 20 66 |nsert-in|dented f|
|000010b0| 6f 72 6d 61 74 20 22 20 | 20 20 25 73 20 25 64 22 |ormat " | %s %d"|
|000010c0| 20 22 20 53 20 20 4d 20 | 54 75 20 20 57 20 54 68 | " S M |Tu W Th|
|000010d0| 20 20 46 20 20 53 22 20 | 22 22 20 30 20 22 20 20 | F S" |"" 0 " |
|000010e0| 20 22 20 22 25 32 64 20 | 22 20 25 20 2f 3d 5d 20 | " "%2d |" % /=] |
|000010f0| 31 35 29 29 0a 0a 28 64 | 65 66 75 6e 20 69 6e 73 |15))..(d|efun ins|
|00001100| 65 72 74 2d 69 6e 64 65 | 6e 74 65 64 20 28 73 74 |ert-inde|nted (st|
|00001110| 72 69 6e 67 20 69 6e 64 | 65 6e 74 20 26 6f 70 74 |ring ind|ent &opt|
|00001120| 69 6f 6e 61 6c 20 6e 65 | 77 6c 69 6e 65 29 20 22 |ional ne|wline) "|
|00001130| 5c 0a 49 6e 73 65 72 74 | 20 53 54 52 49 4e 47 20 |\.Insert| STRING |
|00001140| 61 74 20 63 6f 6c 75 6d | 6e 20 49 4e 44 45 4e 54 |at colum|n INDENT|
|00001150| 2e 0a 49 66 20 74 68 65 | 20 6f 70 74 69 6f 6e 61 |..If the| optiona|
|00001160| 6c 20 70 61 72 61 6d 65 | 74 65 72 20 4e 45 57 4c |l parame|ter NEWL|
|00001170| 49 4e 45 20 69 73 20 74 | 72 75 65 2c 20 6c 65 61 |INE is t|rue, lea|
|00001180| 76 65 20 70 6f 69 6e 74 | 20 61 74 20 73 74 61 72 |ve point| at star|
|00001190| 74 20 6f 66 20 6e 65 78 | 74 0a 6c 69 6e 65 2c 20 |t of nex|t.line, |
|000011a0| 69 6e 73 65 72 74 69 6e | 67 20 61 20 6e 65 77 6c |insertin|g a newl|
|000011b0| 69 6e 65 20 69 66 20 74 | 68 65 72 65 20 77 61 73 |ine if t|here was|
|000011c0| 20 6e 6f 20 6e 65 78 74 | 20 6c 69 6e 65 3b 20 6f | no next| line; o|
|000011d0| 74 68 65 72 77 69 73 65 | 2c 20 6c 65 61 76 65 20 |therwise|, leave |
|000011e0| 70 6f 69 6e 74 0a 61 66 | 74 65 72 20 74 68 65 20 |point.af|ter the |
|000011f0| 69 6e 73 65 72 74 65 64 | 20 74 65 78 74 2e 20 20 |inserted| text. |
|00001200| 56 61 6c 75 65 20 69 73 | 20 61 6c 77 61 79 73 20 |Value is| always |
|00001210| 60 74 27 2e 22 20 28 62 | 79 74 65 2d 63 6f 64 65 |`t'." (b|yte-code|
|00001220| 20 22 c4 08 21 88 69 08 | 57 85 0c 00 08 6a 88 09 | "..!.i.|W....j..|
|00001230| 63 88 0a 85 23 00 c5 20 | 88 6d 83 20 00 c2 20 82 |c...#.. |.m. .. .|
|00001240| 23 00 c6 c7 21 88 c3 87 | 22 20 5b 69 6e 64 65 6e |#...!...|" [inden|
|00001250| 74 20 73 74 72 69 6e 67 | 20 6e 65 77 6c 69 6e 65 |t string| newline|
|00001260| 20 74 20 6d 6f 76 65 2d | 74 6f 2d 63 6f 6c 75 6d | t move-|to-colum|
|00001270| 6e 20 65 6e 64 2d 6f 66 | 2d 6c 69 6e 65 20 66 6f |n end-of|-line fo|
|00001280| 72 77 61 72 64 2d 6c 69 | 6e 65 20 31 5d 20 35 29 |rward-li|ne 1] 5)|
|00001290| 29 0a 0a 28 64 65 66 75 | 6e 20 73 74 61 72 2d 64 |)..(defu|n star-d|
|000012a0| 61 74 65 20 6e 69 6c 20 | 22 5c 0a 52 65 70 6c 61 |ate nil |"\.Repla|
|000012b0| 63 65 20 74 6f 64 61 79 | 27 73 20 64 61 74 65 20 |ce today|'s date |
|000012c0| 77 69 74 68 20 61 73 74 | 65 72 69 73 6b 73 20 69 |with ast|erisks i|
|000012d0| 6e 20 74 68 65 20 63 61 | 6c 65 6e 64 61 72 20 77 |n the ca|lendar w|
|000012e0| 69 6e 64 6f 77 2e 0a 54 | 68 69 73 20 66 75 6e 63 |indow..T|his func|
|000012f0| 74 69 6f 6e 20 63 61 6e | 20 62 65 20 75 73 65 64 |tion can| be used|
|00001300| 20 77 69 74 68 20 74 68 | 65 20 63 61 6c 65 6e 64 | with th|e calend|
|00001310| 61 72 2d 68 6f 6f 6b 20 | 72 75 6e 20 61 66 74 65 |ar-hook |run afte|
|00001320| 72 20 74 68 65 0a 63 61 | 6c 65 6e 64 61 72 20 77 |r the.ca|lendar w|
|00001330| 69 6e 64 6f 77 20 68 61 | 73 20 62 65 65 6e 20 70 |indow ha|s been p|
|00001340| 72 65 70 61 72 65 64 2e | 22 20 28 62 79 74 65 2d |repared.|" (byte-|
|00001350| 63 6f 64 65 20 22 c1 18 | c2 c3 21 88 c4 c5 21 88 |code "..|..!...!.|
|00001360| c6 63 88 c7 c3 21 29 87 | 22 20 5b 62 75 66 66 65 |.c...!).|" [buffe|
|00001370| 72 2d 72 65 61 64 2d 6f | 6e 6c 79 20 6e 69 6c 20 |r-read-o|nly nil |
|00001380| 66 6f 72 77 61 72 64 2d | 63 68 61 72 20 31 20 64 |forward-|char 1 d|
|00001390| 65 6c 65 74 65 2d 62 61 | 63 6b 77 61 72 64 2d 63 |elete-ba|ckward-c|
|000013a0| 68 61 72 20 32 20 22 2a | 2a 22 20 62 61 63 6b 77 |har 2 "*|*" backw|
|000013b0| 61 72 64 2d 63 68 61 72 | 5d 20 34 29 29 0a |ard-char|] 4)). |
+--------+-------------------------+-------------------------+--------+--------+