Created
March 26, 2014 22:26
-
-
Save jhrr/9795066 to your computer and use it in GitHub Desktop.
c311 .emacs settings -- including miniKanren stuffs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; .emacs (full version) | |
;;; A .emacs file for C311 students. To use this file, rename | |
;;; it to '.emacs' and place it in your home directory. | |
;;; [3 November 2004] | |
;;; Will Byrd created the initial version of this file from the | |
;;; simple .emacs file posted earlier. Portions of this file were | |
;;; were taken from Aziz Ghuloum's .emacs file. | |
;;; General Emacs customization | |
;;; Change the load-path string below to point to the .emacs.d | |
;;; directory on your machine. For example, Will uses the string | |
;;; "~/.emacs.d" on his laptop running Mac OS X. Windoze users | |
;;; will probably want to put the .emacs.d directory in the | |
;;; "My Documents" directory. | |
(add-to-list 'load-path "~/.emacs.d") | |
;;; For Mac users who want to use the option key as Meta (instead of | |
;;; the Apple key). | |
(setq mac-command-key-is-meta nil) | |
;;; Hilight the selected region | |
(setq transient-mark-mode t) | |
;;; Avoid iconizing emacs. | |
(global-unset-key "\C-z") | |
;;; Jump to a specific line of the current buffer | |
(global-set-key "\M-g" 'goto-line) | |
;;; Tabs are evil? | |
;;; Use spaces instead of tabs for indentation. | |
(setq indent-tabs-mode nil) | |
;;; Turn on syntax-highlighting. | |
(global-font-lock-mode t) | |
(load-library "font-lock") | |
(setq font-lock-maximum-decoration t) | |
;;; Scheme-specific customization | |
;;; Load the Quack mode, which is an advanced Scheme mode. | |
(require 'quack) | |
;;; Loading/creating a file/buffer whose name ends with '.ss' | |
;;; automagically switches Emacs to Scheme mode. | |
(setq auto-mode-alist (cons '("\\.ss" . scheme-mode) auto-mode-alist)) | |
;;; Change the program name string below to point to Petite Chez | |
;;; Scheme on your machine. For example, Will uses the string | |
;;; "/usr/bin/petite" on his laptop running Mac OS X. | |
(setq scheme-program-name "petite") | |
;;; Teach Emacs how to properly indent | |
;;; certain Scheme special forms | |
;;; (such as 'pmatch') | |
(put 'cond 'scheme-indent-function 0) | |
(put 'for-each 'scheme-indent-function 0) | |
(put 'pmatch 'scheme-indent-function 1) | |
(put 'match 'scheme-indent-function 1) | |
(put 'union-case 'scheme-indent-function 2) | |
(put 'cases 'scheme-indent-function 1) | |
(put 'let-values 'scheme-indent-function 1) | |
(put 'call-with-values 'scheme-indent-function 2) | |
(put 'syntax-case 'scheme-indent-function 2) | |
(put 'test 'scheme-indent-function 1) | |
(put 'test-check 'scheme-indent-function 1) | |
(put 'test-divergence 'scheme-indent-function 1) | |
(put 'make-engine 'scheme-indent-function 0) | |
(put 'with-mutex 'scheme-indent-function 1) | |
(put 'trace-lambda 'scheme-indent-function 1) | |
(put 'timed-lambda 'scheme-indent-function 1) | |
(put 'tlambda 'scheme-indent-function 1) | |
;;; minikanren-specific indentation | |
(put 'lambdaf@ 'scheme-indent-function 1) | |
(put 'lambdag@ 'scheme-indent-function 1) | |
(put 'fresh 'scheme-indent-function 1) | |
(put 'exists 'scheme-indent-function 1) | |
(put 'exist 'scheme-indent-function 1) | |
(put 'nom 'scheme-indent-function 1) | |
(put 'run 'scheme-indent-function 2) | |
(put 'conde 'scheme-indent-function 0) | |
(put 'conda 'scheme-indent-function 0) | |
(put 'condu 'scheme-indent-function 0) | |
(put 'project 'scheme-indent-function 1) | |
(put 'run* 'scheme-indent-function 1) | |
(put 'run1 'scheme-indent-function 1) | |
(put 'run2 'scheme-indent-function 1) | |
(put 'run3 'scheme-indent-function 1) | |
(put 'run4 'scheme-indent-function 1) | |
(put 'run5 'scheme-indent-function 1) | |
(put 'run6 'scheme-indent-function 1) | |
(put 'run7 'scheme-indent-function 1) | |
(put 'run8 'scheme-indent-function 1) | |
(put 'run9 'scheme-indent-function 1) | |
(put 'run10 'scheme-indent-function 1) | |
(put 'run11 'scheme-indent-function 1) | |
(put 'run12 'scheme-indent-function 1) | |
(put 'run13 'scheme-indent-function 1) | |
(put 'run15 'scheme-indent-function 1) | |
(put 'run22 'scheme-indent-function 1) | |
(put 'run34 'scheme-indent-function 1) | |
;;; For folks who like pretty colors on their screens: | |
(require 'color-theme) | |
(color-theme-dark-blue2) | |
(if (fboundp 'global-font-lock-mode) | |
(global-font-lock-mode 1); Emacs | |
(setq font-lock-auto-fontify t)); XEmacs | |
; (set-background-color "black") | |
; (set-foreground-color "PaleTurquoise1") | |
;;; Never make an unbalanced parens mistake again. | |
;;; Not for the faint of heart, but very nice once you get the hang of it! | |
; | |
; (autoload 'balanced-toggle "balanced" "Toggle balanced ``mode''" t) | |
; (autoload 'balanced-on "balanced" "Turn on balanced ``mode''" t) | |
; (add-hook 'scheme-mode-hook 'balanced-on) | |
; (add-hook 'inferior-scheme-mode-hook 'balanced-on) | |
;;; For Mac users only! | |
; A nice font for code. | |
; (set-default-font "*apple-monaco-*14*") ;;; monaco 14 is okay for programming | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(column-number-mode t) | |
'(paren-blinking "t" t) | |
'(paren-matching t t) | |
'(quack-default-program "petite") | |
'(quack-fontify-style (quote plt)) | |
'(quack-pltish-fontify-keywords-p t) | |
'(quack-pltish-keywords-to-fontify (quote ("and" "begin" "begin0" "c-declare" "c-lambda" "call-with-current-continuation" "call-with-input-file" "call-with-output-file" "call/cc" "case" "case-lambda" "class" "class*" "class*/names" "class100" "class100*" "compound-unit/sig" "cond" "cond-expand" "define" "define-macro" "define-module" "define-public" "define-signature" "define-struct" "define-syntax" "define-syntax-set" "define-values" "define-values/invoke-unit/sig" "define/contract" "define/override" "define/private" "define/public" "delay" "do" "else" "exit-handler" "field" "if" "import" "inherit" "inherit-field" "init" "init-field" "init-rest" "instantiate" "interface" "lambda" "let" "let*" "let*-values" "let+" "let-syntax" "let-values" "let/ec" "letrec" "letrec-values" "letrec-syntax" "match" "match-lambda" "match-lambda*" "match-let" "match-let*" "match-letrec" "match-define" "mixin" "module" "opt-lambda" "or" "override" "override*" "namespace-variable-bind/invoke-unit/sig" "parameterize" "private" "private*" "protect" "provide" "provide-signature-elements" "provide/contract" "public" "public*" "quote" "receive" "rename" "require" "require-for-syntax" "send" "send*" "set!" "set!-values" "signature->symbols" "super-instantiate" "syntax-case" "syntax-case*" "syntax-error" "syntax-rules" "unit/sig" "unless" "when" "with-handlers" "with-method" "with-syntax"))) | |
'(quack-pretty-lambda-p nil) | |
'(quack-programs (quote ("petite" "bigloo" "csi" "gosh" "gsi" "guile" "kawa" "mit-scheme" "mred -z" "mzscheme" "mzscheme -M errortrace" "rs" "scheme" "scheme48" "scsh" "sisc" "stklos" "sxi"))) | |
'(quack-remap-find-file-bindings-p nil) | |
'(quack-run-scheme-always-prompts-p nil) | |
'(quack-switch-to-scheme-method (quote cmuscheme))) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(quack-pltish-comment-face ((((class color) (background dark)) (:slant italic)))) | |
'(quack-pltish-defn-face ((t (:foreground "purple1" :weight bold)))) | |
'(quack-pltish-keyword-face ((t (:foreground "cyan")))) | |
'(quack-pltish-paren-face ((((class color) (background dark)) (:foreground "cyan3")))) | |
'(quack-pltish-selfeval-face ((((class color) (background dark)) (:foreground "green")))) | |
'(quack-threesemi-semi-face ((((class color) (background dark)) (:background "white" :foreground "white" :box nil)))) | |
'(quack-threesemi-text-face ((((class color) (background dark)) (:background "cyan4" :foreground "white" :box nil))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment