*SOLVED* Emacs won't highlight my PHP

"Please leave a message at the beep, we will get back to you when your support contract expires."

Moderators: phlip, Moderators General, Prelates

User avatar
Posts: 1642
Joined: Thu Mar 15, 2007 12:54 am UTC
Location: 52.44°N, 13.55°E

*SOLVED* Emacs won't highlight my PHP

Postby Arancaytar » Wed Oct 27, 2010 4:12 pm UTC

Well, it will, but only if the code is inside a file named *.php, which is kind of stupid. Many PHP library files are named *.inc, and the Drupal CMS uses special names like *.module and *.install. Is there a way to add these extensions to a configuration file so that emacs will know to apply PHP syntax highlighting to them?

Oh whoops, never mind; I found it after all.

There is a regex pattern in /etc/emacs/site-start.d/50php-elisp.el that checks for .php[34]? or .phtml, which is easy enough to extend. :)
"You cannot dual-wield the sharks. One is enough." -Our DM.

Return to “The Help Desk”

Who is online

Users browsing this forum: No registered users and 3 guests