From 58bd57c8a945daaed7a1932598c5b95790eafa0e Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Wed, 29 Nov 2023 02:37:19 +0900 Subject: [PATCH] Add php-base-mode --- CHANGELOG.md | 9 ++++++++- lisp/php.el | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ffd2693..62f59096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,14 @@ All notable changes of the PHP Mode 1.19.1 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - +## Unreleased + +### Added + + * Add `php-base-mode` which is the base of php related modes ([#772]) + * `php-base-mode` is designed as a common parent mode for `php-mode` and [`php-ts-mode`](https://github.com/emacs-php/php-ts-mode). + +[#772]: https://github.com/emacs-php/php-mode/pull/772 ## [1.25.1] - 2023-11-24 diff --git a/lisp/php.el b/lisp/php.el index 3c5f3490..41ec092e 100644 --- a/lisp/php.el +++ b/lisp/php.el @@ -627,6 +627,14 @@ Look at the `php-executable' variable instead of the constant \"php\" command." (setq mode nil))) (or mode php-default-major-mode))) +(define-derived-mode php-base-mode prog-mode "PHP" + "Generic major mode for editing PHP. + +This mode is intended to be inherited by concrete major modes. +Currently there are `php-mode' and `php-ts-mode'." + :group 'php + nil) + ;;;###autoload (defun php-mode-maybe () "Select PHP mode or other major mode."