 
 (setq scheme-program-name "csi -:c")
 
-;; TODO: paredit, inf-clojure, magit
+(av/package-install 'clojure-mode)

    (progn
      (tool-bar-mode -1)
      (setq default-frame-alist '((height . 46) (width . 96)))
      (setq-default cursor-type 'bar))
  (xterm-mouse-mode 1))

(setq inhibit-startup-screen t

    (set-face-background 'mode-line "#323334")
    (setq face-near-same-color-threshold 20000)))

(av/package-install 'popup-edit-menu)
(require 'popup-edit-menu)
(global-set-key [mouse-3] (popup-edit-menu-stub))


;;; ------------------------------------------------------------
;;; Default fonts

(defun av/flatten (mylist)
  (cond
   ((null mylist) nil)
   ((atom mylist) (list mylist))
   (t
    (append (av/flatten (car mylist))
            (av/flatten (cdr mylist))))))

(defun av/first-installed-font (fonts)
  (seq-find (lambda (x)
              (member (cdr (assoc :family x))
                      (font-family-list)))
            fonts))

(defun av/set-font (type fonts)
  (let ((font-attrs (av/first-installed-font fonts)))
    (when font-attrs
      (apply 'set-face-attribute type nil (av/flatten font-attrs)))))

(let ((monospace '(((:family . "Inconsolata") (:height . 135))
                   ((:family . "Consolas")    (:height . 110)))))
