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,26 +4,24 @@
;; Author: Soonho Kong ;; Author: Soonho Kong
;; ;;
(when (and (package-installed-p 'mmm-mode) (require 'mmm-mode)
(package-installed-p 'lua-mode)) (require 'mmm-auto)
(require 'mmm-mode) (require 'lua-mode)
(require 'mmm-auto) (setq mmm-global-mode 'maybe)
(require 'lua-mode) (setq mmm-submode-decoration-level 0)
(setq mmm-global-mode 'maybe) (eval-after-load 'mmm-vars
(setq mmm-submode-decoration-level 0) '(progn
(eval-after-load 'mmm-vars (mmm-add-group
'(progn 'lean-lua
(mmm-add-group '((lua-inline
'lean-lua :submode lua-mode
'((lua-inline :face mmm-code-submode-face
:submode lua-mode :insert ((?l lean-tag nil @ "(*\n" @ " " _ "" @ "\n*)" @))
:face mmm-code-submode-face :front "[(][*]"
:insert ((?l lean-tag nil @ "(*\n" @ " " _ "" @ "\n*)" @)) :back "[*][)]")))
:front "[(][*]" (mmm-add-mode-ext-class 'lean-mode "\\.lean" 'lean-lua)))
:back "[*][)]"))) (defun lean-mmm-lua-hook ()
(mmm-add-mode-ext-class 'lean-mode "\\.lean" 'lean-lua))) (setq-local mmm-parse-when-idle t)
(defun lean-mmm-lua-hook () (setq-local mmm-idle-timer-delay 0.5))
(setq-local mmm-parse-when-idle t)
(setq-local mmm-idle-timer-delay 0.5)))
(provide 'lean-mmm-lua) (provide 'lean-mmm-lua)

View file

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