multi-web-mode
multi-web-mode copied to clipboard
Plan to Support major-mode callback?
(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
(js-mode "<script +\\(type=\"text/javascript\"\\|language=\"javascript\"\\)[^>]*>" "</script>")
(css-mode "<style +type=\"text/css\"[^>]*>" "</style>")))
Above is how we initialize major mode selector (how I can call it?).
I think, it is useful when mweb
permits to add hook function into each tags. So when we change from one mode to another, the hook called. It'll be more fun I thing..
(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>" my-php-mode-hook-function)
(js-mode "<script +\\(type=\"text/javascript\"\\|language=\"javascript\"\\)[^>]*>" "</script>" my-js-mode-mode-hook-function)
(css-mode "<style +type=\"text/css\"[^>]*>" "</style>")))