.emacs.d/ag-modes.el
author Adam Gomaa <adam@gomaa.us>
Sun Dec 18 13:13:02 2011 -0500
changeset 521 67f37d330ad0
parent 507 133562d9606d
permissions -rw-r--r--
Remove project & _list_projects, I don't use them anymore.
code@350
     1
(autoload 'espresso-mode "espresso" "Start espresso-mode" t)
adam@464
     2
(autoload 'markdown-mode "markdown-mode" nil t)
code@425
     3
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
adam@464
     4
(autoload 'apache-mode "apache-mode" nil t)
code@2
     5
adam@464
     6
(add-to-list 'auto-mode-alist '("\\.html$" . html-mode))
adam@464
     7
(add-to-list 'auto-mode-alist '("\\.htm$" . html-mode))
adam@464
     8
(add-to-list 'auto-mode-alist '("\\.aspx$" . html-mode))
adam@464
     9
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
code@425
    10
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
adam@464
    11
(add-to-list 'auto-mode-alist '("\\.wsgi\\'" . python-mode))
adam@464
    12
(add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode))
adam@464
    13
(add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode))
adam@464
    14
(add-to-list 'auto-mode-alist '("\\.mdml\\'" . markdown-mode))
adam@464
    15
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
adam@464
    16
(add-to-list 'auto-mode-alist '("\\.cs\\'" . java-mode))
adam@464
    17
code@425
    18
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
adam@484
    19
(add-to-list 'interpreter-mode-alist '("python3" . python-mode))
code@2
    20
adam@464
    21
code@2
    22
(add-hook 'latex-mode-hook
code@2
    23
          '(lambda ()
code@2
    24
	    (define-key latex-mode-map "(" 'lparen)
code@2
    25
	    (define-key latex-mode-map ")" 'rparen)
code@2
    26
	    (define-key latex-mode-map "9" 'lparen)
code@2
    27
	    (define-key latex-mode-map "0" 'rparen)
code@2
    28
	    (define-key latex-mode-map "x /" 'latex-close-block)
code@2
    29
            ))
code@2
    30
code@130
    31
adam@471
    32
(set 'set-highlight-80+ (lambda nil (highlight-80+-mode)))
code@443
    33
adam@483
    34
(add-hook 'python-mode-hook set-highlight-80+)
adam@483
    35
(add-hook 'espresso-mode-hook set-highlight-80+)
adam@483
    36
(add-hook 'sh-mode-hook set-highlight-80+)
code@23
    37
code@2
    38
adam@472
    39
(when (load "flymake" t)
adam@472
    40
  (defun flymake-pyflakes-init ()
adam@472
    41
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
adam@472
    42
                       'flymake-create-temp-inplace))
adam@472
    43
           (local-file (file-relative-name
adam@472
    44
                        temp-file
adam@472
    45
                        (file-name-directory buffer-file-name))))
adam@472
    46
      (list "pyflakes" (list local-file))))
adam@472
    47
adam@472
    48
  (add-to-list 'flymake-allowed-file-name-masks
adam@472
    49
               '("\\.py\\'" flymake-pyflakes-init)))
adam@483
    50
;(add-hook 'python-mode-hook '(lambda () (flymake-mode 1)))
code@166
    51
code@174
    52
adam@511
    53
;(load "~/var/srv/launchpad.net/nxhtml/autostart.el")
adam@507
    54
code@166
    55
(require 'flymake-point)
code@166
    56
adam@507
    57
adam@507
    58
adam@507
    59
code@2
    60
(provide 'ag-modes)