Actual code. Ready to package for (M)ELPA.