feat(emacs): assume lua-mode and mmm-mode are available

This commit is contained in:
Leonardo de Moura 2015-01-30 11:32:49 -08:00
parent d0ce4cf62f
commit a57251913a
2 changed files with 20 additions and 24 deletions

View file

@ -4,14 +4,12 @@
;; Author: Soonho Kong
;;
(when (and (package-installed-p 'mmm-mode)
(package-installed-p 'lua-mode))
(require 'mmm-mode)
(require 'mmm-auto)
(require 'lua-mode)
(setq mmm-global-mode 'maybe)
(setq mmm-submode-decoration-level 0)
(eval-after-load 'mmm-vars
(require 'mmm-mode)
(require 'mmm-auto)
(require 'lua-mode)
(setq mmm-global-mode 'maybe)
(setq mmm-submode-decoration-level 0)
(eval-after-load 'mmm-vars
'(progn
(mmm-add-group
'lean-lua
@ -22,8 +20,8 @@
:front "[(][*]"
:back "[*][)]")))
(mmm-add-mode-ext-class 'lean-mode "\\.lean" 'lean-lua)))
(defun lean-mmm-lua-hook ()
(defun lean-mmm-lua-hook ()
(setq-local mmm-parse-when-idle t)
(setq-local mmm-idle-timer-delay 0.5)))
(setq-local mmm-idle-timer-delay 0.5))
(provide 'lean-mmm-lua)

View file

@ -176,9 +176,7 @@ enabled and disabled respectively.")
(when lean-company-use
(company-lean-hook))
;; mmm-lua-mode
(when (and (package-installed-p 'mmm-mode)
(package-installed-p 'lua-mode))
(lean-mmm-lua-hook)))
(lean-mmm-lua-hook))
;; Automode List
;;;###autoload