[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
- [elpa] master 37f6dea 396/433: mmm-indent-line: Use primary mode if submode ends right here, (continued)
- [elpa] master 37f6dea 396/433: mmm-indent-line: Use primary mode if submode ends right here, Dmitry Gutov, 2018/03/15
- [elpa] master 1b9406d 361/433: Released 0.5.0, Dmitry Gutov, 2018/03/15
- [elpa] master f9e4dd5 376/433: Fix #26, Dmitry Gutov, 2018/03/15
- [elpa] master f5ea03a 399/433: Don't try to enable jit-lock in temp buffers, Dmitry Gutov, 2018/03/15
- [elpa] master 18bb050 392/433: Released 0.5.2, Dmitry Gutov, 2018/03/15
- [elpa] master 0cc4df5 410/433: Document mode transition hooks, Dmitry Gutov, 2018/03/15
- [elpa] master 8dcb066 414/433: Reword docstring & fix indentation, Dmitry Gutov, 2018/03/15
- [elpa] master c9a857a 407/433: Save font-lock-syntactic-face-function per major mode, Dmitry Gutov, 2018/03/15
- [elpa] master 545b85d 327/433: added more cc-mode variables to mmm-save-local-variables, Dmitry Gutov, 2018/03/15
- [elpa] master d58aacc 365/433: Fix mmm-add-to-major-mode-preferences docstring, Dmitry Gutov, 2018/03/15
- [elpa] master 3d83b62 383/433: Add mmm-defaults.el (#36),
Dmitry Gutov <=
- [elpa] master 278ba52 386/433: Fix #37, Dmitry Gutov, 2018/03/15
- [elpa] master ed9e32c 242/433: * FAQ: Updated comments about other emacs variants., Dmitry Gutov, 2018/03/15
- [elpa] master ecf2a75 257/433: Use correct variable name..., Dmitry Gutov, 2018/03/15
- [elpa] master cd85acc 266/433: Added file for building SRPMs, thanks to bishop, Dmitry Gutov, 2018/03/15
- [elpa] master 93e7a93 271/433: (mmm-save-local-variables): Add semantic stuff and, Dmitry Gutov, 2018/03/15
- [elpa] master c1a33b7 260/433: (mmm-define-key): Added optional keymap argument, Dmitry Gutov, 2018/03/15
- [elpa] master 821386c 283/433: Ignore .elc files, Dmitry Gutov, 2018/03/15
- [elpa] master 2cb7c99 189/433: Added multiple faces and optional levels of decoration., Dmitry Gutov, 2018/03/15
- [elpa] master 5321422 248/433: Updated docstrings and comments. Added primary mode hook., Dmitry Gutov, 2018/03/15
- [elpa] master 5f82799 276/433: * version.texi: Release 0.4.8., Dmitry Gutov, 2018/03/15