comparison .elisp/settings/40.modes.el @ 109:8e04d9d41a55

reindent-then-newline-and-indent is the best discovery of the week.
author Augie Fackler <durin42@gmail.com>
date Wed, 17 Jun 2009 15:47:51 -0500
parents 16b57e1fc23d
children 6a64e61359b7
comparison
equal deleted inserted replaced
108:0d410d93d754 109:8e04d9d41a55
24 (autoload 'js2-mode "js2" nil t) 24 (autoload 'js2-mode "js2" nil t)
25 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) 25 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
26 (add-hook 'js2-mode-hook 'af-tab-fix) 26 (add-hook 'js2-mode-hook 'af-tab-fix)
27 27
28 (add-hook 'ruby-mode-hook (lambda () 28 (add-hook 'ruby-mode-hook (lambda ()
29 (af-tab-fix) 29 (af-tab-fix))
30 (local-set-key "\C-m" 'newline-and-indent))) 30 (define-key ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent)
31 31
32 (require 'django-html-mode) 32 (require 'django-html-mode)
33 ;; I think I probably just always want it in django mode for now 33 ;; I think I probably just always want it in django mode for now
34 (add-to-list 'auto-mode-alist '("\\.html$'" . django-html-mode)) 34 (add-to-list 'auto-mode-alist '("\\.html$'" . django-html-mode))
35 (define-key django-html-mode-map (kbd "RET") 'reindent-then-newline-and-indent)
35 36
36 (defun af-python-mode-hook () 37 (defun af-python-mode-hook ()
37 ; highlight tabs in Python 38 ; highlight tabs in Python
38 (make-variable-buffer-local 'font-lock-mode-hook) 39 (make-variable-buffer-local 'font-lock-mode-hook)
39 (add-hook 'font-lock-mode-hook 'show-ws-highlight-tabs) 40 (add-hook 'font-lock-mode-hook 'show-ws-highlight-tabs)