multi-web-mode icon indicating copy to clipboard operation
multi-web-mode copied to clipboard

Plan to Support major-mode callback?

Open Abdillah opened this issue 10 years ago • 0 comments

(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>")))

Abdillah avatar Jan 26 '15 02:01 Abdillah