GitHubプロジェクトにissueを作成してバグ報告や機能リクエストを送ってください。
Note
最新版のPHP ModeはEmacs 30をサポートしています。
アップグレードに伴うトラブルはDiscussionsに気軽に書き込んでください。
Warning
Emacsをアップグレードした直後に初めてPHPファイルを開いたときに、CC Mode関連のエラーが発生する可能性があります。これは以前のバージョンのEmacsでバイトコンパイルされたPHP Modeがディスクにキャッシュされているために起こるので、PHP Modeの再インストールによって解決します。
M-x php-mode-debug-reinstall または M-x package-reinstall php-mode コマンドをお試しください。
PHP ModeはEmacs 27.1以降で動作します。対応バージョンの詳細はSupported Versionをお読みください。Emacs 28以降では単に以下のコマンドを実行するだけでインストールできます。
M-x package-install php-mode
package-archivesにMELPAを追加することで、Web上の多くのパッケージでEmacsを強化できます。
パッケージマネージャへの依存なしでインストールしたい場合は、Lispファイルを直接配置する伝統的な方法も可能です。詳しくはManual installationをお読みください。
.emacsファイル(~/.emacs.d/init.el)にPHPモードの設定を記述できます。
(defun my-php-mode-init ()
(subword-mode 1)
(setq-local show-trailing-whitespace t)
(setq-local ac-disable-faces '(font-lock-comment-face font-lock-string-face))
(add-hook 'hack-local-variables-hook 'php-ide-turn-on nil t))
(with-eval-after-load 'php-mode
(add-hook 'php-mode-hook #'my-php-mode-init)
(custom-set-variables
'(php-mode-coding-style 'psr2)
'(php-mode-template-compatibility nil)
'(php-imenu-generic-expression 'php-imenu-generic-expression-simple))
;; If you find phpcs to be bothersome, you can disable it.
(when (require 'flycheck nil)
(add-to-list 'flycheck-disabled-checkers 'php-phpmd)
(add-to-list 'flycheck-disabled-checkers 'php-phpcs)))プロジェクトのトップディレクトリに.dir-locals.elまたは.dir-locals-2.elを記述すると、プロジェクト単位の設定を追加することができます。このファイルはユーザー自身のEmacsにインストールされたパッケージに依存するため、バージョン管理の対象に含めないことを推奨します。
((nil
(php-project-root . git)
(php-project-coding-style . psr2)))バグ報告の際には M-x php-mode-debug の出力を含めてください。この情報は問題の再現に役立ちます。
CONTRIBUTING.mdをご覧ください。
PHP ModeはGNU General Public License Version 3 (GPLv3) でライセンスされています。
このプロジェクトは1999年にTuradg Aleahmadが書いたphp-mode.elに起源を持ちます。2013年にDaniel HackneyがEmacs組み込みのCC Modeをもとに書き直し始めました。PHPモードの改善に協力した貢献者のリストはAuthorsとContributorsに掲載されています。
このプロジェクトは2017年までEric James Michael Ritzによりメンテナンスされていました。現在はFriends of Emacs-PHP Developmentコミュニティが引き継いで開発しています。
Copyright (C) 2023 Friends of Emacs-PHP development Copyright (C) 1999, 2000, 2001, 2003, 2004 Turadg Aleahmad 2008 Aaron S. Hawley 2011, 2012, 2013, 2014, 2015, 2016, 2017 Eric James Michael RitzThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.