Any emacs veterans able to assist?

I can not find the files that the various websites that claim to show you how to obtain or make the settings for emacs24 to highlight PHP.

I read contradicting information that some members of the team who developed the highlighting for php are refusing to sign the paperwork (I am assuming making it copy-left)

Some alternatives look like they exist, I did find some files but I can not edit them as they are read only.

PHP mode for emacs sends me to a sourceforge site and the development is for windows...

I found this http://www.emacswiki.org/emacs/php-mode-improved.el and would like to try it, so I found the /etc/emacs24 folder and made a file where other .el files existed and wasn't able to paste in the data from that link's download, the emacs24 moans about the file being read only and when I try to quit I am stuck in a save dialog.

Where do I stick it? Then what do I need to do next as it is not entirely clear.

1 Answer 1


I ran

apt-cache search php |grep -i emacs

which shows

php-elisp - Emacs support for php files

and after

sudo apt-get install php-elisp

emacs shows a php file quite colorful.

  • I do not know why this does not work for me (emacs 26, Ubuntu 16) Aug 20, 2018 at 7:19
  • 1
    @BillalBEGUERADJ: (use-package php-mode :ensure t) works for me on Emacs 26.1 on Ubuntu 18.04
    – jfs
    Aug 23, 2018 at 13:37
  • I followed this method, and it worked for me, even if the listed package was elpa-php-mode. Installing phps-mode, the package listed from Emacs, didn't automatically highlighted PHP code, while elpa-php-mode worked out-of-the-box. I am using Linux Lite 5.4 as distribution; that could explain the different deb package I found with apt-cache search php | grep -i emacs.
    – apaderno
    Apr 19, 2021 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.