http://www.perlmonks.org?node_id=315348


in reply to On-the-fly all-languages syntax highlighting

There is an Emacs package called htmlize that can be used to export to HTML any fontified Emacs buffer, including font-locked programming modes of course.