;; .emacs file for CS 3110

;;----------------------------------------------------------------------
;; Disable the middle-mouse-button paste feature
(global-set-key [mouse-2]
  '(lambda () (interactive)
     (message "Pasting with middle-button disabled in .emacs file!")))

;;----------------------------------------------------------------------
;; General settings

(setq scroll-step 3)                    ; Move only one line at a time
(setq scroll-conservatively 200)
(setq next-line-add-newlines nil)       ; No newlines on down key
(setq make-backup-files nil)            ; Avoid backup litter
(setq auto-save-list-file-prefix nil)   ; Avoid .save litter
(setq-default indent-tabs-mode nil)     ; Prevent extraneous tabs
(add-hook 'text-mode-hook 'turn-on-auto-fill) ; Automatically wrap text
(line-number-mode t)         ; Show line number in the modeline
(column-number-mode t)       ; Show column number in the modeline
(global-font-lock-mode t)    ; Automatically highlight when possible
;; Key bindings are similar to standard Windows accelerators.
(pc-selection-mode)
;; Match up the parens without being too annoying.
(show-paren-mode 1)


;;----------------------------------------------------------------------
;; Include tuareg-mode in Emacs.

(add-to-list 'load-path "~/tuareg-mode-1.45.6")
(autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t)
(autoload 'camldebug "camldebug" "Run the Caml debugger" t)
(setq auto-mode-alist 
      (append '(("\\.ml[ily]?$" . tuareg-mode)
		("\\.topml$" . tuareg-mode))
	      auto-mode-alist))

;; lineker-mode warns you about lines over 80 characters
(add-to-list 'load-path "~")
(require 'lineker)
(add-hook 'tuareg-mode-hook 'lineker-mode)