[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/php-mode 0b598a9676 1/4: Add php-base-mode for common pare
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/php-mode 0b598a9676 1/4: Add php-base-mode for common parent mode for php editing modes |
Date: |
Tue, 28 Nov 2023 16:00:11 -0500 (EST) |
branch: elpa/php-mode
commit 0b598a96760bfc09c29984fe1ca7d7ac660caa98
Author: USAMI Kenta <tadsan@zonu.me>
Commit: USAMI Kenta <tadsan@zonu.me>
Add php-base-mode for common parent mode for php editing modes
---
CHANGELOG.md | 9 ++++++++-
lisp/php.el | 9 +++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3ffd269358..62f59096e4 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 -->
+## 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 3c5f34901c..8fa7a6d56f 100644
--- a/lisp/php.el
+++ b/lisp/php.el
@@ -627,6 +627,15 @@ Look at the `php-executable' variable instead of the
constant \"php\" command."
(setq mode nil)))
(or mode php-default-major-mode)))
+;;;###autoload
+(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."