From 1a408ea81b07e9d008eadc76c71a3665ec65a931 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 6 Mar 2013 11:22:08 +0900 Subject: [PATCH] reindent when C-m on html-mode --- emacs.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/emacs.el b/emacs.el index 59c4f4c..6a547cc 100644 --- a/emacs.el +++ b/emacs.el @@ -675,9 +675,6 @@ found, otherwise returns nil." (add-to-list 'interpreter-mode-alist '("python2" . python-mode)) -;; (add-hook default-majorg-mode -;; 'my-detect-major-mode-from-shebang) - ;; http://fukuyama.co/foreign-regexp '(and (fetch-library "https://raw.github.com/k-talo/foreign-regexp.el/master/foreign-regexp.el" @@ -783,6 +780,11 @@ found, otherwise returns nil." (setq auto-mode-alist (append '(("PKGBUILD\\'" . pkgbuild-mode)) auto-mode-alist))) +(add-hook 'html-mode-hook + (lambda () + (define-key html-mode-map (kbd "C-m") + 'reindent-then-newline-and-indent))) + (add-hook 'text-mode-hook (lambda () (define-key text-mode-map (kbd "C-m") 'newline)))