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
(defhtml base-html | |
"Function produces an enlive HTML hash-map of the base HTML. This hash-map is | |
used as a base template for other HTML definitions." | |
[site-title] | |
[:html | |
[:head (map include-css ["/css/reset.css" | |
"/css/main.css"]) | |
[:meta {:name "robots" | |
:content "noindex"}]] | |
[:body |
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
;; escape quits everything | |
(define-key evil-normal-state-map [escape] 'keyboard-quit) | |
(define-key evil-visual-state-map [escape] 'keyboard-quit) | |
(define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit) | |
(define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit) | |
(define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit) | |
(define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit) | |
(define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; org-mode ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; org-mode | |
(require 'org) | |
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) | |
(setq org-startup-folded nil) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Magit ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Don't open a new frame. | |
(setq ediff-window-setup-function 'ediff-setup-windows-plain) | |
(add-hook 'magit-mode-hook | |
(lambda () | |
(local-set-key (kbd "j") 'evil-next-line) |
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
;;;; Ex 1.3 | |
;;; Define a procedure that takes three numbers as arguments and returns the sum | |
;;; of the squares of the two larger numbers. | |
(define (sum-sq n1 n2 n3) | |
(if (and (< n1 n2) (< n1 n3)) | |
(+ (* n2 n2) (* n3 n3)) | |
(sum-sq n2 n3 n1))) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Cider REPL ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; TODO: Have 0 and ^ start after > | |
(add-hook 'cider-repl-mode-hook | |
(lambda () | |
(evil-local-set-key 'normal (kbd "C-j") 'cider-repl-forward-input) | |
(evil-local-set-key 'insert (kbd "C-j") 'cider-repl-forward-input) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Magit ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(add-hook 'magit-mode-hook | |
(lambda () | |
(local-set-key (kbd "j") 'evil-next-line) | |
(local-set-key (kbd "k") 'evil-previous-line) | |
(local-set-key (kbd "K") 'magit-discard-item) | |
(local-set-key (kbd "<escape>") 'magit-mode-quit-window))) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Dependencies ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(require 'cl) ; Enable Common Lisp functions(Does not actually use CL) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Utility Functions ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Magit ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(add-hook 'magit-mode-hook | |
(lambda () | |
(local-set-key (kbd "j") 'evil-next-line) | |
(local-set-key (kbd "k") 'evil-previous-line) | |
(local-set-key (kbd "K") 'magit-discard-item) | |
(local-set-key (kbd "<escape>") 'magit-mode-quit-window))) |
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
(add-hook 'dired-mode-hook | |
(lambda () | |
(evil-local-set-key 'normal (kbd "h") 'dired-up-directory) | |
(evil-local-set-key 'normal (kbd "l") 'quit-window))) |
NewerOlder