Skip to content

Commit 0b598a9

Browse files
committed
Add php-base-mode for common parent mode for php editing modes
1 parent f7beda8 commit 0b598a9

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
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.
44

5-
<!-- ## Unreleased -->
5+
## Unreleased
6+
7+
### Added
8+
9+
* Add `php-base-mode` which is the base of php related modes ([#772])
10+
* `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).
11+
12+
[#772]: https://github.com/emacs-php/php-mode/pull/772
613

714
## [1.25.1] - 2023-11-24
815

lisp/php.el

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,15 @@ Look at the `php-executable' variable instead of the constant \"php\" command."
627627
(setq mode nil)))
628628
(or mode php-default-major-mode)))
629629

630+
;;;###autoload
631+
(define-derived-mode php-base-mode prog-mode "PHP"
632+
"Generic major mode for editing PHP.
633+
634+
This mode is intended to be inherited by concrete major modes.
635+
Currently there are `php-mode' and `php-ts-mode'."
636+
:group 'php
637+
nil)
638+
630639
;;;###autoload
631640
(defun php-mode-maybe ()
632641
"Select PHP mode or other major mode."

0 commit comments

Comments
 (0)