aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2018-11-10 20:18:07 -0500
committerJesús <heckyel@hyperbola.info>2018-11-10 20:18:07 -0500
commita097edaebc399fa52f57850a7d3e3046a9d7fc65 (patch)
tree54c08ca67c4494ec1108ffc118b522854ffe284b /lisp
parenta4607a27d33da1f1210bbd7d687f4a3a3b0d7111 (diff)
downloademacs-personal-a097edaebc399fa52f57850a7d3e3046a9d7fc65.tar.lz
emacs-personal-a097edaebc399fa52f57850a7d3e3046a9d7fc65.tar.xz
emacs-personal-a097edaebc399fa52f57850a7d3e3046a9d7fc65.zip
Improve mmm-mode
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-mmm-mode.el27
1 files changed, 20 insertions, 7 deletions
diff --git a/lisp/init-mmm-mode.el b/lisp/init-mmm-mode.el
index 75c18e3..8db0a55 100644
--- a/lisp/init-mmm-mode.el
+++ b/lisp/init-mmm-mode.el
@@ -1,16 +1,29 @@
(use-package mmm-mode
-
:config
-
(setq mmm-global-mode 'maybe)
(mmm-add-mode-ext-class nil "\\.php?\\'" 'html-php)
(mmm-add-mode-ext-class nil "\\.ctp?\\'" 'html-php)
(set-face-background 'mmm-default-submode-face nil)
- (mmm-add-classes
- '((html-php
- :submode php-mode
- :front "<\\?\\(php\\)?"
- :back "\\?>")))
+
+ (mmm-add-group 'html-php
+ '((html-php-output
+ :submode php-mode
+ :face mmm-output-submode-face
+ :front "<\\?php *echo "
+ :back "\\(\\?>\\|\\'\\)"
+ :include-front t
+ :front-offset 5
+ :insert ((?e php-echo nil @ "<?php" @ " echo " _ " " @ "?>" @))
+ )
+ (html-php-code
+ :submode php-mode
+ :face mmm-code-submode-face
+ :front "<\\?\\(php\\)?"
+ :back "\\(\\?>\\|\\'\\)"
+ :insert ((?p php-section nil @ "<?php" @ " " _ " " @ "?>" @)
+ (?b php-block nil @ "<?php" @ "\n" _ "\n" @ "?>" @))
+ )))
+
)
(provide 'init-mmm-mode)