
I finally formalized, cleaned up, and packaged up my current emacs editing setup for files with intermixed PHP, HTML, JS/javascript, and CSS code all in the same file. It uses an existing but rarely used technique called “multi-mode” and sets “trigger points” for switching the “major mode” of the buffer as your cursor moves through the code.