feat(emacs/lean-mmm-lua.el): add mmm-mode to syntax-highlight lua code

in lean-mode

Close #74
This commit is contained in:
Soonho Kong 2014-09-02 10:33:19 -07:00
parent 51152b011d
commit cec2f8e466
2 changed files with 26 additions and 0 deletions

25
src/emacs/lean-mmm-lua.el Normal file
View file

@ -0,0 +1,25 @@
;; Copyright (c) 2013, 2014 Microsoft Corporation. All rights reserved.
;; Released under Apache 2.0 license as described in the file LICENSE.
;;
;; 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 'buffers-with-submode-classes)
(setq mmm-submode-decoration-level 0)
(eval-after-load 'mmm-vars
'(progn
(mmm-add-group
'lean-lua
'((lua-inline
:submode lua-mode
:face mmm-code-submode-face
:front "[(][*]"
:back "[*][)]")))
(mmm-add-mode-ext-class 'lean-mode "\\.lean" 'lean-lua))))
(provide 'lean-mmm-lua)

View file

@ -25,6 +25,7 @@
(require 'lean-tags)
(require 'lean-option)
(require 'lean-syntax)
(require 'lean-mmm-lua)
(defun lean-compile-string (exe-name args file-name)
"Concatenate exe-name, args, and file-name"