Source

dotfiles / .emacs.d / ag-modes.el

Full commit
;(autoload 'espresso-mode "espresso" "Start espresso-mode" t)
(autoload 'markdown-mode "markdown-mode" nil t)
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
(autoload 'less-css-mode "less-css-mode" "LESS css mode" t)
(autoload 'apache-mode "apache-mode" nil t)


;(add-to-list 'load-path "~/var/build/python-mode.el-6.0.8")
;(setq py-install-directory "~/var/build/python-mode.el-6.0.8")
;(require 'python-mode)


(add-to-list 'auto-mode-alist '("\\.html$" . html-mode))
(add-to-list 'auto-mode-alist '("\\.htm$" . html-mode))
(add-to-list 'auto-mode-alist '("\\.django$" . html-mode))
(add-to-list 'auto-mode-alist '("\\.aspx$" . html-mode))
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
(add-to-list 'auto-mode-alist '("\\.wsgi\\'" . python-mode))
;(add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode))
;(add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode))
(add-to-list 'auto-mode-alist '("\\.mdml\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.cs\\'" . java-mode))

(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
;(add-to-list 'interpreter-mode-alist '("python3" . python-mode))


;(autoload 'python-mode "python-mode" "Python Mode." t)
;(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
;(add-to-list 'interpreter-mode-alist '("python" . python-mode))

(add-hook 'latex-mode-hook
          '(lambda ()
	    (define-key latex-mode-map "(" 'lparen)
	    (define-key latex-mode-map ")" 'rparen)
	    (define-key latex-mode-map "9" 'lparen)
	    (define-key latex-mode-map "0" 'rparen)
	    (define-key latex-mode-map "x /" 'latex-close-block)
            ))


(set 'set-highlight-80+ (lambda nil (highlight-80+-mode t)))

(add-hook 'python-mode-hook set-highlight-80+)
(add-hook 'espresso-mode-hook set-highlight-80+)
(add-hook 'sh-mode-hook set-highlight-80+)


(when (load "flymake" t)
  (defun flymake-pyflakes-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
                       'flymake-create-temp-inplace))
           (local-file (file-relative-name
                        temp-file
                        (file-name-directory buffer-file-name))))
      (list "pyflakes" (list local-file))))

  (add-to-list 'flymake-allowed-file-name-masks
               '("\\.py\\'" flymake-pyflakes-init)))
;(add-hook 'python-mode-hook '(lambda () (flymake-mode 1)))


;(load "~/tmp/nxhtml/autostart.el")

(require 'flymake-point)




(provide 'ag-modes)