new “php-htm-mode” for emacs — intermixed PHP, HTML, JS, and CSS using multi-modes

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.

A nice thing about this approach is that you can always glance down anytime you are editing to see which mode you are in (or the emacs lisp code *thinks* you are in).  You can also fork/edit the single “.el” lisp file to add/update the triggers for various modes.

https://github.com/traceypooh/php-htm-mode

Screenshot:

screenshot of php-htm-mode
screenshot of php-htm-mode

Sony P-Series running 10.10 Meerkat Ubuntu

Sony P-Series
(specifically: win7 era P788K, 8″ 1600×768 display, 2B RAM, GMA 500 graphics, 64GB SSD)

I got this supercute mini-laptop last year

I had been using Ubuntu linux Lucid (10.4) and just upped to Meerkat (10.10). (Both were Netbook Edition).
I’d never gotten video acceleration to work before and was stuck w/ ~1-5 fps video most of the time.

Doing the widely suggested:

sudo add-apt-repository ppa:gma500/ppa && sudo add-apt-repository ppa:gma500/fix && sudo apt-get update && sudo apt-get install poulsbo-driver-2d poulsbo-driver-3d poulsbo-config

bricked my vaio 8-( well, i mean, it gave me root login w/o X/windows ability but… 8-p)
but 2-3 apt-get remove, reinstalls, hunting google later, found the apparent saviour (I did 1000mb from 2000mb recommended here):

sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem=1000mb acpi_osi=Linux"
sudo update-grub

booted clean! *immediately* got ability to use proprietary vaio accessory to output VGA to external monitor (a first!) and brightness up/down hotkeys working. (brightness to work even at all!)
but best of all, video and appearance *and everything* (moving windows, starting applications) was *so much faster* visually!

cmd-line video playback with:
sudo apt-get remove mplayer
sudo apt-get install gnome-mplayer gecko-mediaplayer

so this is *all* i have done, aside from starting w/ vanilla install (with just a few changes to help w/ SSD instead of HD) of lucid upgraded to meerkat.
(personally, i’m still working on getting suspend/resume to work (seems to work but the display doesn’t come back on — been like this the whole time) and to get hibernate to work — prolly will go with some kinda memory stick to dump to)

UPDATE!

suspend/resume working now with change to suggested “gma500 fix”

sudo add-apt-repository ppa:gma500/ppa && sudo add-apt-repository ppa:gma500/fix && sudo apt-get update && sudo apt-get install poulsbo-driver-2d poulsbo-driver-3d poulsbo-config

I think this additional suggestion may have fixed sleep/resume (but it’s possible it was just the gma500/fix related packages in live above:

sudo mv /usr/lib/pm-utils/sleep.d/99video /usr/lib/pm-utils/99video