emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 3d83b62 383/433: Add mmm-defaults.el (#36)


From: Dmitry Gutov
Subject: [elpa] master 3d83b62 383/433: Add mmm-defaults.el (#36)
Date: Thu, 15 Mar 2018 19:44:40 -0400 (EDT)

branch: master
commit 3d83b62df5ea7509e371b4dec911b510a45b6924
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Add mmm-defaults.el (#36)
---
 mmm-defaults.el | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/mmm-defaults.el b/mmm-defaults.el
new file mode 100644
index 0000000..25bca3e
--- /dev/null
+++ b/mmm-defaults.el
@@ -0,0 +1,58 @@
+;;; mmm-defaults.el --- Friendly defaults for MMM Mode
+
+;; Copyright (C) 2013 by Dmitry Gutov
+
+;; Author: Dmitry Gutov <address@hidden>
+
+;;{{{ GPL
+
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Just add the following line to your init file to enable multiple mode
+;; support in ERB, EJS and PHP files:
+;;
+;; (require 'mmm-defaults)
+;;
+;; TODO: Add more file types and classes here. Mention this file in README.
+
+;;; Code:
+
+(require 'mmm-auto)
+
+(setq mmm-global-mode 'auto)
+
+;;; 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 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 '("\\.jst\\.ejs\\'"  . html-erb-mode))
+
+;;; PHP
+
+(mmm-add-mode-ext-class 'html-mode nil 'html-js)
+(mmm-add-mode-ext-class 'html-mode nil 'html-css)
+(mmm-add-mode-ext-class 'html-mode nil 'html-php)
+(add-to-list 'auto-mode-alist '("\\.html\\.php\\'" . html-mode))
+
+(provide 'mmm-defaults)
+
+;;; mmm-defaults.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]