 (add-to-list 'compilation-error-regexp-alist-alist '(jshint "^\\(.*\\): line \\([0-9]+\\), col \\([0-9]+\\), " 1 2 3))
 (add-to-list 'compilation-error-regexp-alist 'jshint)
 
-;; always clean whitespace in javascript mode
-(defun remap-save-clean-whitespace ()
-  (interactive)
-  (local-set-key [remap save-buffer] 'clean-whitespace-and-save))
-(add-hook 'js-mode-hook 'remap-save-clean-whitespace)
-
 ;; set up tab key
 (add-hook 'js-mode-hook 'set-tab)
 

  (interactive)
  (switch-to-buffer (make-temp-name "scratch"))
  (org-mode))


(defun clean-whitespace-and-save ()
  (interactive)
  (delete-trailing-whitespace)
  (save-buffer))


(global-set-key [home] 'smart-beginning-of-line)

                'org-mode-hook
                'ess-mode-hook))
  )

;; For some stupid reason ess doesn't define this autoload, or this
;; file association!
