瀏覽代碼

reindent when C-m on html-mode

pull/1/head
10sr 11 年之前
父節點
當前提交
1a408ea81b
共有 1 個檔案被更改,包括 5 行新增3 行删除
  1. +5
    -3
      emacs.el

+ 5
- 3
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)))


Loading…
取消
儲存