diff options
Diffstat (limited to 'chicken/csirc')
-rw-r--r-- | chicken/csirc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/chicken/csirc b/chicken/csirc new file mode 100644 index 0000000..8cc74cf --- /dev/null +++ b/chicken/csirc | |||
@@ -0,0 +1,35 @@ | |||
1 | ;;; csirc --- initialization file for chicken scheme interpreter -*- scheme -*- | ||
2 | ;; import ease-of-life stuff | ||
3 | (set! ##sys#notices-enabled #f) | ||
4 | (import (chicken load)) | ||
5 | (load-verbose #f) | ||
6 | (import (r7rs) | ||
7 | (utf8)) | ||
8 | ;; set up breadline | ||
9 | (let () | ||
10 | (import (chicken format)) | ||
11 | (import (chicken process-context)) | ||
12 | (import (chicken process signal)) | ||
13 | (unless (get-environment-variable "INSIDE_EMACS") | ||
14 | (import breadline) | ||
15 | (import breadline-scheme-completion) | ||
16 | (history-file (format "~a/chicken/csi_history" | ||
17 | (or (get-environment-variable "XDG_DATA_HOME") | ||
18 | (format "~a/~a" (get-environment-variable "HOME") | ||
19 | (".local/share"))))) | ||
20 | (stifle-history! 10000) | ||
21 | (completer-word-break-characters-set! "\"'`;|(") | ||
22 | (completer-set! scheme-completer) | ||
23 | (basic-quote-characters-set! "\"|") | ||
24 | (variable-bind! "blink-matching-paren" "on") | ||
25 | (paren-blink-timeout-set! 200000) | ||
26 | (let ((handler (signal-handler signal/int))) | ||
27 | (set-signal-handler! | ||
28 | signal/int | ||
29 | (lambda (s) | ||
30 | (cleanup-after-signal!) | ||
31 | (reset-after-signal!) | ||
32 | (handler s)))) | ||
33 | (on-exit reset-terminal!) | ||
34 | (current-input-port (make-readline-port)))) | ||
35 | (set! ##sys#notices-enabled #t) | ||