Artifact
ab27eade5c57315fde1823d4b6d9bedc8818cd8b:
0000: 28 63 6f 6e 64 2d 65 78 70 61 6e 64 0a 20 28 63 (cond-expand. (c
0010: 68 69 63 6b 65 6e 2d 34 0a 20 20 3b 3b 20 63 68 hicken-4. ;; ch
0020: 69 63 6b 65 6e 20 34 20 73 74 75 66 66 20 68 65 icken 4 stuff he
0030: 72 65 0a 20 20 28 75 73 65 20 72 65 61 64 6c 69 re. (use readli
0040: 6e 65 29 0a 20 20 28 63 75 72 72 65 6e 74 2d 69 ne). (current-i
0050: 6e 70 75 74 2d 70 6f 72 74 20 28 6d 61 6b 65 2d nput-port (make-
0060: 72 65 61 64 6c 69 6e 65 2d 70 6f 72 74 29 29 0a readline-port)).
0070: 20 20 28 69 6e 73 74 61 6c 6c 2d 68 69 73 74 6f (install-histo
0080: 72 79 2d 66 69 6c 65 20 23 66 20 22 2f 2e 63 73 ry-file #f "/.cs
0090: 69 2e 68 69 73 74 6f 72 79 22 29 0a 20 20 29 0a i.history"). ).
00a0: 20 28 63 68 69 63 6b 65 6e 2d 35 0a 20 20 28 69 (chicken-5. (i
00b0: 6d 70 6f 72 74 20 28 63 68 69 63 6b 65 6e 20 6c mport (chicken l
00c0: 6f 61 64 29 29 0a 20 20 28 69 6d 70 6f 72 74 20 oad)). (import
00d0: 28 63 68 69 63 6b 65 6e 20 66 6f 72 6d 61 74 29 (chicken format)
00e0: 29 0a 20 20 28 69 6d 70 6f 72 74 20 28 63 68 69 ). (import (chi
00f0: 63 6b 65 6e 20 70 72 6f 63 65 73 73 2d 63 6f 6e cken process-con
0100: 74 65 78 74 29 29 0a 20 20 28 69 6d 70 6f 72 74 text)). (import
0110: 20 28 63 68 69 63 6b 65 6e 20 70 72 6f 63 65 73 (chicken proces
0120: 73 20 73 69 67 6e 61 6c 29 29 0a 20 20 28 6c 6f s signal)). (lo
0130: 61 64 2d 76 65 72 62 6f 73 65 20 23 66 29 0a 20 ad-verbose #f).
0140: 20 28 6c 65 74 20 28 29 0a 20 20 20 20 28 75 6e (let (). (un
0150: 6c 65 73 73 20 28 67 65 74 2d 65 6e 76 69 72 6f less (get-enviro
0160: 6e 6d 65 6e 74 2d 76 61 72 69 61 62 6c 65 20 22 nment-variable "
0170: 49 4e 53 49 44 45 5f 45 4d 41 43 53 22 29 0a 20 INSIDE_EMACS").
0180: 20 20 20 20 20 28 69 6d 70 6f 72 74 20 62 72 65 (import bre
0190: 61 64 6c 69 6e 65 29 0a 20 20 20 20 20 20 28 69 adline). (i
01a0: 6d 70 6f 72 74 20 62 72 65 61 64 6c 69 6e 65 2d mport breadline-
01b0: 73 63 68 65 6d 65 2d 63 6f 6d 70 6c 65 74 69 6f scheme-completio
01c0: 6e 29 0a 20 20 20 20 20 20 28 68 69 73 74 6f 72 n). (histor
01d0: 79 2d 66 69 6c 65 20 28 66 6f 72 6d 61 74 20 22 y-file (format "
01e0: 7e 61 2f 2e 63 73 69 5f 68 69 73 74 6f 72 79 22 ~a/.csi_history"
01f0: 20 28 67 65 74 2d 65 6e 76 69 72 6f 6e 6d 65 6e (get-environmen
0200: 74 2d 76 61 72 69 61 62 6c 65 20 22 48 4f 4d 45 t-variable "HOME
0210: 22 29 29 29 0a 20 20 20 20 20 20 28 73 74 69 66 "))). (stif
0220: 6c 65 2d 68 69 73 74 6f 72 79 21 20 31 30 30 30 le-history! 1000
0230: 30 29 0a 20 20 20 20 20 20 28 63 6f 6d 70 6c 65 0). (comple
0240: 74 65 72 2d 77 6f 72 64 2d 62 72 65 61 6b 2d 63 ter-word-break-c
0250: 68 61 72 61 63 74 65 72 73 2d 73 65 74 21 20 22 haracters-set! "
0260: 5c 22 5c 27 60 3b 7c 28 22 29 0a 20 20 20 20 20 \"\'`;|(").
0270: 20 28 63 6f 6d 70 6c 65 74 65 72 2d 73 65 74 21 (completer-set!
0280: 20 73 63 68 65 6d 65 2d 63 6f 6d 70 6c 65 74 65 scheme-complete
0290: 72 29 0a 20 20 20 20 20 20 28 62 61 73 69 63 2d r). (basic-
02a0: 71 75 6f 74 65 2d 63 68 61 72 61 63 74 65 72 73 quote-characters
02b0: 2d 73 65 74 21 20 22 5c 22 7c 22 29 0a 20 20 20 -set! "\"|").
02c0: 20 20 20 28 76 61 72 69 61 62 6c 65 2d 62 69 6e (variable-bin
02d0: 64 21 20 22 62 6c 69 6e 6b 2d 6d 61 74 63 68 69 d! "blink-matchi
02e0: 6e 67 2d 70 61 72 65 6e 22 20 22 6f 6e 22 29 0a ng-paren" "on").
02f0: 20 20 20 20 20 20 28 70 61 72 65 6e 2d 62 6c 69 (paren-bli
0300: 6e 6b 2d 74 69 6d 65 6f 75 74 2d 73 65 74 21 20 nk-timeout-set!
0310: 32 30 30 30 30 30 29 0a 20 20 20 20 20 20 28 6c 200000). (l
0320: 65 74 20 28 28 68 61 6e 64 6c 65 72 20 28 73 69 et ((handler (si
0330: 67 6e 61 6c 2d 68 61 6e 64 6c 65 72 20 73 69 67 gnal-handler sig
0340: 6e 61 6c 2f 69 6e 74 29 29 29 0a 09 28 73 65 74 nal/int)))..(set
0350: 2d 73 69 67 6e 61 6c 2d 68 61 6e 64 6c 65 72 21 -signal-handler!
0360: 20 73 69 67 6e 61 6c 2f 69 6e 74 0a 09 09 09 20 signal/int....
0370: 20 20 20 20 28 6c 61 6d 62 64 61 20 28 73 29 0a (lambda (s).
0380: 09 09 09 20 20 20 20 20 20 20 28 63 6c 65 61 6e ... (clean
0390: 75 70 2d 61 66 74 65 72 2d 73 69 67 6e 61 6c 21 up-after-signal!
03a0: 29 0a 09 09 09 20 20 20 20 20 20 20 28 72 65 73 ).... (res
03b0: 65 74 2d 61 66 74 65 72 2d 73 69 67 6e 61 6c 21 et-after-signal!
03c0: 29 0a 09 09 09 20 20 20 20 20 20 20 28 68 61 6e ).... (han
03d0: 64 6c 65 72 20 73 29 29 29 29 0a 20 20 20 20 20 dler s)))).
03e0: 20 28 6f 6e 2d 65 78 69 74 20 72 65 73 65 74 2d (on-exit reset-
03f0: 74 65 72 6d 69 6e 61 6c 21 29 0a 20 20 20 20 20 terminal!).
0400: 20 28 63 75 72 72 65 6e 74 2d 69 6e 70 75 74 2d (current-input-
0410: 70 6f 72 74 20 28 6d 61 6b 65 2d 72 65 61 64 6c port (make-readl
0420: 69 6e 65 2d 70 6f 72 74 29 29 29 29 0a 20 20 29 ine-port)))). )
0430: 29 0a ).