about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--init.el25
2 files changed, 24 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..07e51b9cb927
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/plists/.DS_Store
+/.DS_Store
diff --git a/init.el b/init.el
index 0c5dc0bfc78d..74dc73428148 100644
--- a/init.el
+++ b/init.el
@@ -8,12 +8,31 @@
 
 ;; Important packages
 (defvar my-pkgs '(starter-kit starter-kit-bindings haskell-mode)
-  "A list of packages to install at launch.")
+  "Packages to install at launch.")
 
 (dolist (p my-pkgs)
   (when (not (package-installed-p p))
     (package-install p)))
 
+;; Enable mouse support on OS X
+(unless window-system
+  (require 'mouse)
+  (xterm-mouse-mode t)
+  (global-set-key [mouse-4] '(lambda ()
+                              (interactive)
+                              (scroll-down 1)))
+  (global-set-key [mouse-5] '(lambda ()
+                              (interactive)
+                              (scroll-up 1)))
+  (defun track-mouse (e))
+  (setq mouse-sel-mode t)
+)
+
 ;; Configure haskell-mode
-(custom-set-variables
- '(haskell-mode-hook '(turn-on-haskell-indentation)))
+;; Enable semi-automatic indentation and font-locking
+(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
+(add-hook 'haskell-mode-hook 'font-lock-mode)
+
+;; Add keybindings to move nested blocks with C-, rsp. C-.
+(define-key haskell-mode-map (kbd "C-,") 'haskell-move-nested-left)
+(define-key haskell-mode-map (kbd "C-.") 'haskell-move-nested-right)