 ;; path where auctex has been installed...
 (add-to-list 'load-path "~/.emacs.d/site-lisp")
 (load "auctex.el" nil t t)
-;; (load "preview-latex.el" nil t t)
-;; Turn on RefTeX for LaTeX documents. Put further RefTeX
-;; customizations in your .emacs file.
-;(add-hook 'LaTeX-mode-hook
-;      (lambda ()
-;	(turn-on-reftex)
-;	(setq reftex-plug-into-AUCTeX t)))
-;(add-hook 'TeX-mode-hook 'turn-on-reftex)
-;; (setq reftex-plug-into-AUCTeX t)
-;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
-;; Minimal OS X-friendly configuration of AUCTeX. Since there is no
-;; DVI viewer for the platform, use pdftex/pdflatex by default for
-;; compilation. Furthermore, use 'open' to view the resulting PDF.
-;; Until Preview learns to refresh automatically on file updates, Skim
-;; (http://skim-app.sourceforge.net) is a nice PDF viewer.
-;; (setq TeX-PDF-mode t)
-;;     (setq TeX-view-program-selection
-;;     '(((output-dvi style-pstricks)
-;;         "dvips and PDF Viewer")
-;;         (output-dvi "PDF Viewer")
-;;         (output-pdf "PDF Viewer")
-;;         (output-html "Safari")))
-;;         (setq TeX-view-program-list
-;;         '(("dvips and PDF Viewer" "%(o?)dvips %d -o && open %f")
-;;         ("PDF Viewer" "open %o")
-;;         ("Safari" "open %o")))
 ;; Add standard Sweave file extensions to the list of files recognized
 ;; by AUCTeX.
 (setq TeX-file-extensions

;3(add-to-list 'auto-mode-alist '("\\.Snw" . poly-noweb+r-mode))
;3(add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode))
(add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))
;3(add-to-list 'auto-mode-alist '("\\.rapport" . poly-rapport-mode))
;3(add-to-list 'auto-mode-alist '("\\.Rhtml" . poly-html+r-mode))
;3(add-to-list 'auto-mode-alist '("\\.Rbrew" . poly-brew+r-mode))
;3(add-to-list 'auto-mode-alist '("\\.Rcpp" . poly-r+c++-mode))
;3(add-to-list 'auto-mode-alist '("\\.cppR" . poly-c++r-mode))
;3(provide 'polymode-configuration)
;;;(add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))
;;;(add-to-list 'auto-mode-alist '("\\.Rd" . poly-markdown+r-mode))


;;;;;;;;;;;;;;;;;;;;;;;;
;; markdown-preview
;;
;;(require 'websocket)
;;(require 'markdown-preview)

;;; * magit
;;;;;;;;;;;;;;;;;;;;;;;;

;; use aspell instead of ispell:
(setq-default ispell-program-name "aspell")  ;; or just symlink ispell to aspell...
;; prevent spell check in code chunks:
; enable spell checking using flyspell for Tex, latex and org-mode,
; disable for ess.
(add-hook 'TeX-mode-hook
