[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 8535a68 385/433: * Enable MMM in ERB and PHP files with ju
From: |
Dmitry Gutov |
Subject: |
[elpa] master 8535a68 385/433: * Enable MMM in ERB and PHP files with just one extension (#36) |
Date: |
Thu, 15 Mar 2018 19:44:40 -0400 (EDT) |
branch: master
commit 8535a686bfdc88cf798f9c575fe681c8f1594932
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
* Enable MMM in ERB and PHP files with just one extension (#36)
* Mention php-mode installation requirement
---
mmm-defaults.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/mmm-defaults.el b/mmm-defaults.el
index d75c21d..acc5e26 100644
--- a/mmm-defaults.el
+++ b/mmm-defaults.el
@@ -23,11 +23,13 @@
;;; Commentary:
-;; Just add the following line to your init file to enable multiple mode
-;; support in ERB, EJS and PHP files:
+;; To enable multiple mode support in ERB, EJS and PHP files, just add the
+;; following line to your init file:
;;
;; (require 'mmm-defaults)
;;
+;; Note that for PHP you still need to have php-mode (installed separately).
+;;
;; TODO: Add more file types and classes here. Mention this file in README.
;;; Code:
@@ -38,12 +40,13 @@
;;; ERB and EJS
-(mmm-add-mode-ext-class 'html-erb-mode "\\.html\\.erb\\'" 'erb)
-(mmm-add-mode-ext-class 'html-erb-mode "\\.jst\\.ejs\\'" 'ejs)
+(mmm-add-mode-ext-class 'html-erb-mode "\\.erb\\'" 'erb)
+(mmm-add-mode-ext-class 'html-erb-mode "\\.ejs\\'" 'ejs)
(mmm-add-mode-ext-class 'html-erb-mode nil 'html-js)
(mmm-add-mode-ext-class 'html-erb-mode nil 'html-css)
(add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . html-erb-mode))
+(add-to-list 'auto-mode-alist '("/[^.]+\\.erb\\'" . html-erb-mode))
(add-to-list 'auto-mode-alist '("\\.jst\\.ejs\\'" . html-erb-mode))
;;; PHP
@@ -52,6 +55,7 @@
(mmm-add-mode-ext-class 'html-mode nil 'html-css)
(mmm-add-mode-ext-class 'html-mode "\\.php\\'" 'html-php)
(add-to-list 'auto-mode-alist '("\\.html\\.php\\'" . html-mode))
+(add-to-list 'auto-mode-alist '("/[^.]+\\.php\\'" . html-mode))
(provide 'mmm-defaults)
- [elpa] master 61b9cf4 325/433: Don't pass nil to mmm-set-local-variables, (continued)
- [elpa] master 61b9cf4 325/433: Don't pass nil to mmm-set-local-variables, Dmitry Gutov, 2018/03/15
- [elpa] master 625353b 427/433: (Mostly) remove some earlier entries, Dmitry Gutov, 2018/03/15
- [elpa] master c548593 333/433: * mmm-set-local-variables: Default to mmm-primary-mode, Dmitry Gutov, 2018/03/15
- [elpa] master d652943 397/433: Fix invalid function call, Dmitry Gutov, 2018/03/15
- [elpa] master 50c054c 331/433: Don't recompute the current overlay in mmm-set-local-variables, Dmitry Gutov, 2018/03/15
- [elpa] master 357cee0 321/433: Revert "Refontify buffer when creating new region", Dmitry Gutov, 2018/03/15
- [elpa] master 8a24631 293/433: Add js-mode vars to `mmm-save-local-variables`, Dmitry Gutov, 2018/03/15
- [elpa] master 45cf811 309/433: Document nxml-mode based setup, Dmitry Gutov, 2018/03/15
- [elpa] master 42ecef5 381/433: Allow omitting the close tag of the last PHP code block., Dmitry Gutov, 2018/03/15
- [elpa] master ff6aa17 391/433: Update NEWS, Dmitry Gutov, 2018/03/15
- [elpa] master 8535a68 385/433: * Enable MMM in ERB and PHP files with just one extension (#36),
Dmitry Gutov <=
- [elpa] master c6f199d 252/433: Tested for only javascript <script> tags (Joe Kelsey), Dmitry Gutov, 2018/03/15
- [elpa] master 8b9c1e7 303/433: Switch mmm-erb.el to unix line endings, and add closing comment line, Dmitry Gutov, 2018/03/15
- [elpa] master ac4822d 295/433: Merge pull request #4 from dgutov/js-fix, Dmitry Gutov, 2018/03/15
- [elpa] master 86cb980 426/433: Write TODO some more, Dmitry Gutov, 2018/03/15
- [elpa] master 0da2ac9 358/433: * mmm-syntax-propertize-function: Don't pass nil to mmm-set-local-variables, Dmitry Gutov, 2018/03/15
- [elpa] master e414b5b 314/433: Fix #12, Dmitry Gutov, 2018/03/15
- [elpa] master 631e7f1 408/433: Add c-symbol-char-key to the saved variables, Dmitry Gutov, 2018/03/15
- [elpa] master c493716 404/433: Revert "mmm-match-region: Return front-pos even without front-delim; likewise for back", Dmitry Gutov, 2018/03/15
- [elpa] master d2c8ade 428/433: More text, Dmitry Gutov, 2018/03/15
- [elpa] master 7661968 415/433: Merge pull request #74 from AdamNiederer/master, Dmitry Gutov, 2018/03/15