Skip to content

Commit

Permalink
Add php-base-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Nov 28, 2023
1 parent f7beda8 commit 58bd57c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions lisp/php.el
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 58bd57c

Please sign in to comment.