# HG changeset patch # User Augie Fackler # Date 1245271671 18000 # Node ID 8e04d9d41a55641723d11015b506fe4a460c6cb1 # Parent 0d410d93d754da653e6ef4bf3b4ec7cca66d8263 reindent-then-newline-and-indent is the best discovery of the week. diff --git a/.elisp/settings/40.modes.el b/.elisp/settings/40.modes.el --- a/.elisp/settings/40.modes.el +++ b/.elisp/settings/40.modes.el @@ -26,12 +26,13 @@ point." (add-hook 'js2-mode-hook 'af-tab-fix) (add-hook 'ruby-mode-hook (lambda () - (af-tab-fix) - (local-set-key "\C-m" 'newline-and-indent))) + (af-tab-fix)) +(define-key ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent) (require 'django-html-mode) ;; I think I probably just always want it in django mode for now (add-to-list 'auto-mode-alist '("\\.html$'" . django-html-mode)) +(define-key django-html-mode-map (kbd "RET") 'reindent-then-newline-and-indent) (defun af-python-mode-hook () ; highlight tabs in Python