 ;;----------------------------------------------------------------------------
 ;; Lisp / Slime
 ;;----------------------------------------------------------------------------
-(setf slime-lisp-implementations
-      '((sbcl ("sbcl") :coding-system utf-8-unix)
-        (cmucl ("cmucl") :coding-system iso-latin-1-unix)))
-(setf slime-default-lisp 'sbcl)
-(require 'slime)
-(slime-setup)
-
-(add-auto-mode 'lisp-mode "\\.cl$")
-(add-hook 'slime-mode-hook 'pretty-lambdas)
-
-;; pretty lambda (see also slime) ->  "λ"
-;;  'greek small letter lambda' / utf8 cebb / unicode 03bb -> \u03BB / mule?!
-;; in greek-iso8859-7 -> 107  >  86 ec
-(defun pretty-lambdas ()
-  (font-lock-add-keywords
-   nil `(("(\\(lambda\\>\\)"
-          (0 (progn (compose-region (match-beginning 1) (match-end 1)
-                                    ,(make-char 'greek-iso8859-7 107))
-                    'font-lock-keyword-face))))))
-(global-set-key [f4] 'slime-selector)
+(when *slime-support-enabled*
+  (setf slime-lisp-implementations
+        '((sbcl ("sbcl") :coding-system utf-8-unix)
+          (cmucl ("cmucl") :coding-system iso-latin-1-unix)))
+  (setf slime-default-lisp 'sbcl)
+  (require 'slime)
+  (slime-setup)
+
+  (add-auto-mode 'lisp-mode "\\.cl$")
+  (add-hook 'slime-mode-hook 'pretty-lambdas)
+
+  ;; pretty lambda (see also slime) ->  "λ"
+  ;;  'greek small letter lambda' / utf8 cebb / unicode 03bb -> \u03BB / mule?!
+  ;; in greek-iso8859-7 -> 107  >  86 ec
+  (defun pretty-lambdas ()
+    (font-lock-add-keywords
+     nil `(("(\\(lambda\\>\\)"
+            (0 (progn (compose-region (match-beginning 1) (match-end 1)
+                                      ,(make-char 'greek-iso8859-7 107))
+                      'font-lock-keyword-face))))))
+  (global-set-key [f4] 'slime-selector))
 
 
 ;;----------------------------------------------------------------------------
 ;; Haskell
 ;;----------------------------------------------------------------------------
-(load-library "haskell-site-file")
-
-(setq haskell-hugs-program-args '("-98" "+."))
-(setq haskell-ghci-program-args '("-fglasgow-exts"))
-
-(add-hook 'haskell-mode-hook
-          (lambda ()
-            ;(turn-on-haskell-hugs)
-            (turn-on-haskell-doc-mode)
-            (turn-on-haskell-indent)
-            (turn-on-haskell-simple-indent)
-            (font-lock-mode)))
-            ;(turn-on-haskell-ghci)))
+(when *haskell-support-enabled*
+  (load-library "haskell-site-file")
+
+  (setq haskell-hugs-program-args '("-98" "+."))
+  (setq haskell-ghci-program-args '("-fglasgow-exts"))
+
+  (add-hook 'haskell-mode-hook
+            (lambda ()
+              (turn-on-haskell-doc-mode)
+              (turn-on-haskell-indent)
+              (turn-on-haskell-simple-indent)
+              (font-lock-mode))))
 
 ;;----------------------------------------------------------------------------
 ;; Conversion of line endings

;;----------------------------------------------------------------------------
;; Augment search path for external programs (for OSX)
;;----------------------------------------------------------------------------
(dolist (dir '("/usr/local/bin" "/opt/local/bin"
               "/opt/local/lib/postgresql81/bin" "~/bin"))
  (setenv "PATH" (concat (expand-file-name dir) ":" (getenv "PATH")))
  (setq exec-path (append (list (expand-file-name dir)) exec-path)))


;;----------------------------------------------------------------------------

;;----------------------------------------------------------------------------
;; Window size and features
;;----------------------------------------------------------------------------
(when *macbook-pro-support-enabled*
  (set-face-attribute 'default nil :family "monaco" :height 120)
  ;; Default frame size (perfect for Macbook Pro when scrollbar and toolbar hidden...)
  (setq initial-frame-alist '((width  . 202) (height . 50) (top . 0) (left . 3) (tool-bar-lines . 0)))
  (setq default-frame-alist '((width  . 202) (height . 50) (top . 22) (left . 3) (tool-bar-lines . 0))))

(tool-bar-mode nil)
(scroll-bar-mode nil)


;;----------------------------------------------------------------------------
