Skip to content

Will GNU Emacs Ever Include php mode?

USAMI Kenta edited this page Mar 19, 2023 · 3 revisions

Short Answer: No.

The Long Answer

When I began work on php-mode, effectively becoming the maintainer soon after, I asked the GNU Emacs developers what it would require to ship php-mode with the editor. What it would require is getting every contributor who has ever worked on php-mode to sign over the copyright for their work to the Free Software Foundation. If you look at the list of contributors in the README you will see:

  1. That is a lot of people to contact and convince.
  2. And in a number of cases I have nothing more to go on than an alias that's many years old.

I quickly decided I did not want to invest that effort. A big reason for that decision was also the inclusion, at the time, of a package manager in GNU Emacs. I still cannot include php-mode in the official ELPA for the reason above, but there are alternative GNU Emacs package repositories like MELPA and Marmalade. And I can submit php-mode to those without having to track down every contributor. And I have submitted php-mode to those places.

So php-mode will never be part of GNU Emacs, unless someone wants to rewrite the mode from scratch. Personally I did not want to go down that route. But with the ability to use alternative package repositories, and with useful sites like EmacsWiki, and most importantly just thanks to word of mouth, I feel like PHP developers using GNU Emacs will be able to easily find php-mode even if it is not part of the standard distribution.

NonGNU ELPA

NonGNU ELPA is a Lisp repository (Emacs Lisp Package Archive) containing useful packages not copyrighted by the Free Software Foundation. This repository has been added out-of-the-box since Emacs 28.

NonGNU ELPA NonGNU-devel ELPA

PHP mode is now registered with NonGNU ELPA, so you can install it without dependencies on third party repositories like MELPA.

Unless you manage packages in a special way, simply add the following code to your init.el:

(unless (package-installed-p 'php-mode)
  (package-install 'php-mode))