diff options
Diffstat (limited to 'tag-emacs')
-rw-r--r-- | tag-emacs/emacs.d/init.el | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index bc131f59..8fd1b20a 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1097,20 +1097,13 @@ (req-package mmm-auto :config (progn - (defvar php-sql-mmm-submode-enabled nil) - (defun php-sql-mmm-submode () - "Provides a very minimal embedding of SQL in PHP, via mmm-mode." - (interactive) - (when (not php-sql-mmm-submode-enabled) - (set-face-background 'mmm-default-submode-face nil) - (mmm-add-classes - '((php-sql - :submode sql-mode - :front "\\($\\(sql\\|query\\)\\s-*=\\s-*[\"']\\|<<<SQL\\)" - :back "\\([\"']\\|SQL\\);?" - :face mmm-code-submode-face))) - (mmm-add-mode-ext-class 'php-mode "\\.php$" 'php-sql) - (setq php-sql-mmm-submode-enabled t))) + (mmm-add-classes + '((php-sql + :submode sql-mode + :front "\\($\\(sql\\|query\\)\\s-*=\\s-*[\"']\\|<<<SQL\\)[\r\n]+" + :back "\\([\"']\\|SQL\\);?" + :face mmm-code-submode-face))) + (mmm-add-mode-ext-class 'php-mode "\\.php$" 'php-sql) (mmm-add-classes '((markdown-toml :submode toml-mode |