Skip to content

Commit d80a657

Browse files
authored
Merge pull request #515 from emacs-php/update/readme
Update README
2 parents 323df21 + a941fc8 commit d80a657

File tree

2 files changed

+154
-67
lines changed

2 files changed

+154
-67
lines changed

README.ja.md

Lines changed: 79 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,92 @@
11
PHP Mode for GNU Emacs
22
======================
33

4+
[![Emacs: 26.2](https://img.shields.io/badge/Emacs-26.2-blue.svg)](https://www.gnu.org/software/emacs/)
45
[![lang: PHP 7](https://img.shields.io/badge/lang-PHP%207-brightgreen.svg)](http://php.net/manual/migration70.php)
56
[![lang: PHP 5](https://img.shields.io/badge/lang-PHP%205-green.svg)](http://php.net/downloads.php)
67
[![travis badge][travis-badge]][travis-link]
78
[![melpa badge][melpa-badge]][melpa-link]
89
[![melpa stable badge][melpa-stable-badge]][melpa-stable-link]
910
[![GPL v3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.txt)
1011

11-
PHP 5.4以降を開発しやすくするための機能をアップデートするプロジェクトです。これは以下の人々の作業をもとにフォークされました。
12+
GNU EmacsでのPHPコーディングを支援するメジャーモードの開発プロジェクトです。
13+
これまで、以下の人々の作業をもとにフォークされました。
1214

13-
1. Turadg Aleahmad (Original Author)
14-
2. Aaron S. Hawley
15-
3. Lennart Borgman
16-
4. Eric James Michael Ritz
17-
5. Syohei Yoshida
15+
1. Turadg Aleahmad (Original Author)
16+
2. Aaron S. Hawley
17+
3. Lennart Borgman
18+
4. Eric James Michael Ritz
19+
5. Syohei Yoshida
1820

1921
リストアップされたすべての貢献者たちも同様にPHPモードを改善しました。
2022

2123
現在のメンテナ:
2224

23-
1. USAMI Kenta (@zonuexe)
25+
1. USAMI Kenta (@zonuexe)
2426

2527
[PHP ModeのGitHubプロジェクト][php-mode]にissueを作成してバグ報告や機能リクエストを送ってください。あるいは[PHP suite][php-suite][FeatHubページ][feathub]に機能リクエストを送っても構いません。
2628

2729
インストール
2830
------------
2931

30-
**PHPモードはEmacs 24.3以降で動作します**。古いバージョンのEmacsでも動作するかもしれませんが、保証外です。 古いバージョンのEmacsのPHPモードを使用することによる問題のバグ報告は積極的に対応しません。
32+
**PHP ModeはEmacs 24.3以降で動作します**。古いバージョンのEmacsでも動作するかもしれませんが、保証外です。 古いバージョンのEmacsのPHPモードを使用することによる問題のバグ報告は積極的に対応しません。現在のサポートポリシーは[Supported Version]のページをご覧ください
3133

32-
GNU Emacs 24以降では、[package][]機能を使って[MELPA][]からPHPモードをインストールすることができます。 *[Marmalade][]パッケージリポジトリには2004年のオリジナル版PHPモードしか登録されていません*。そのため、MELPAを使用してPHPモードをインストールすることを推奨します。単にパッケージマネージャを使いたくない場合は、`php-mode.el`ファイルをダウンロードして`load-path`の通ったディレクトリに配置し、必要に応じて `(require 'php-mode)` をEmacsの設定に追加すると、PHPファイルを開くたびに自動的にPHPモードが有効になります。
34+
### **(推奨)** MELPAからのインストール
3335

34-
さらに`skeleton/php-ext.el``load-path`に追加することで[テンプレートを有効にする](https://www.gnu.org/software/emacs/manual/html_node/autotype/index.html#Top)ことができます。
36+
[![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link]
3537

36-
```lisp
37-
(eval-after-load 'php-mode
38-
'(require 'php-ext))
38+
GNU Emacs 24以降では、[package][]機能(または[Cask][])を使って[MELPA][]/[MELPA Stable][]からPHP Modeをインストールできます。
39+
40+
### 手動でインストール
41+
42+
このプロジェクトを `git cline` または、[php-mode releases]からzip/tarアーカイブをダウンロードして展開してください。
43+
44+
#### A: `(load php-mode-autoloads.el)` *(推奨)*
45+
46+
これはパッケージマネージャを利用した場合と同等のパフォーマンスと使いやすさを両立した初期化方法です。
47+
48+
ダウンロードしたコードを展開したディレクトリに移動し、`make`コマンドを実行すると、バイトコンパイルおよび `php-mode-autoloads.el` を生成できます。 `init.el`からファイルをロードするだけで使用準備は完了です。
49+
50+
```el
51+
;; Put follow code into init.el
52+
(when (file-directory-p "~/path/to/php-mode")
53+
(load "~/path/to/php-mode/php-mode-autoloads.el"))
54+
55+
;; Any code below is *unnecessary*
56+
;; (require 'php-mode)
57+
;; (add-to-list 'load-path (expand-file-name "~/path/to/php-mode"))
58+
;; (add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
59+
```
60+
61+
#### **B**: `(autoload 'php-mode)`
62+
63+
Emacs起動時の僅かな読み込み増加をも削減したい上級ユーザー向けです。
64+
65+
この場合も `make`でバイトコンパイルしておくことを推奨します。
66+
67+
```el
68+
;; Put follow code into init.el
69+
(autoload 'php-mode (expand-file-name "~/path/to/php-mode/php-mode") "\
70+
Major mode for editing PHP code.
71+
72+
\\{php-mode-map}
73+
74+
\(fn)" t nil)
75+
76+
(add-to-list 'auto-mode-alist '("\\.\\(?:php\\|phtml\\)\\'" . php-mode))
77+
78+
;; Any code below is *unnecessary*
79+
;; (add-to-list 'load-path (expand-file-name "~/path/to/php-mode"))
80+
;; (require 'php-mode)
81+
```
82+
83+
#### **C**: `(require 'php-mode)` *(非推奨)*
84+
85+
特定のパスから`php-mode`を同期的に読み込みます。 **A**の場合と比べて10倍のサイズのコードを読み込むことになり、起動時間の増加幅はCPUとファイスシステムのパフォーマンスに依存します。
86+
87+
```el
88+
(require 'php-mode "~/path/to/php-mode/php-mode")
89+
(add-to-list 'load-path (expand-file-name "~/path/to/php-mode"))
3990
```
4091

4192
バグを報告する
@@ -306,42 +357,34 @@ Wiki
306357

307358
GitHubのプロジェクトページには[wiki][]があり、自由に編集して構いません。このWikiには今後追加する計画のある機能やバグが掲載されています。また、PHPモードをより使いやすくするためのTipsを追加できます。
308359

309-
メーリングリスト
310-
----------------
311-
312-
The “emacs-php” mailing list is a place to discuss PHP Mode as well as all other PHP-related packages for Emacs. You can find the mailing list at:
313-
314-
1. [emacs-php at Google Groups](https://groups.google.com/forum/#!forum/emacs-php)
315-
2. [Gmane](http://dir.gmane.org/gmane.emacs.php)
316-
317-
We encourage all users of PHP Mode *and* developers of any PHP-related packages to feel free to post anything there regarding PHP and Emacs.
318-
319-
320360
ライセンス
321361
-------
322362

323363
PHP Mode uses the [GNU General Public License 3](http://www.gnu.org/copyleft/gpl.html).
324364

325-
326365
Contributors
327366
------------
328367

329368
PHPモードの改善に協力したすべての貢献者のリストは[README.md#contributors](https://github.com/emacs-php/php-mode/blob/master/README.md#contributors)に掲載されています。
330369

331-
[wiki]: https://github.com/emacs-php/php-mode/wiki
332-
[cc mode]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html
333-
[Subword Mode]: https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
334-
[camelCase]: https://ja.wikipedia.org/wiki/%E3%82%AD%E3%83%A3%E3%83%A1%E3%83%AB%E3%82%B1%E3%83%BC%E3%82%B9
335-
[package]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html
336-
[MELPA]: http://melpa.milkbox.net/
370+
[Cask]: https://github.com/cask/cask
371+
[MELPA Stable]: https://stable.melpa.org/
372+
[MELPA]: https://melpa.org/
337373
[Marmalade]: http://marmalade-repo.org/
374+
[Subword Mode]: https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
375+
[Supported Version]: https://github.com/emacs-php/php-mode/wiki/Supported-Version
338376
[Web Mode]: http://web-mode.org/
339-
[travis-badge]: https://travis-ci.org/emacs-php/php-mode.svg
340-
[travis-link]: https://travis-ci.org/emacs-php/php-mode
341-
[melpa-link]: http://melpa.org/#/php-mode
342-
[melpa-stable-link]: http://stable.melpa.org/#/php-mode
377+
[camelCase]: https://ja.wikipedia.org/wiki/%E3%82%AD%E3%83%A3%E3%83%A1%E3%83%AB%E3%82%B1%E3%83%BC%E3%82%B9
378+
[cc mode]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html
379+
[feathub]: https://feathub.com/emacs-php/php-suite
343380
[melpa-badge]: http://melpa.org/packages/php-mode-badge.svg
381+
[melpa-link]: http://melpa.org/#/php-mode
344382
[melpa-stable-badge]: http://stable.melpa.org/packages/php-mode-badge.svg
383+
[melpa-stable-link]: http://stable.melpa.org/#/php-mode
384+
[package]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html
345385
[php-mode]: https://github.com/emacs-php/php-mode
386+
[php-mode releases]: https://github.com/emacs-php/php-mode/releases
346387
[php-suite]: https://github.com/emacs-php/php-suite
347-
[feathub]: https://feathub.com/emacs-php/php-suite
388+
[travis-badge]: https://travis-ci.org/emacs-php/php-mode.svg
389+
[travis-link]: https://travis-ci.org/emacs-php/php-mode
390+
[wiki]: https://github.com/emacs-php/php-mode/wiki

README.md

Lines changed: 75 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
PHP Mode for GNU Emacs
22
======================
33

4-
[![Emacs: 26.1](https://img.shields.io/badge/Emacs-26.1-blue.svg)](https://www.gnu.org/software/emacs/)
4+
[![Emacs: 26.2](https://img.shields.io/badge/Emacs-26.2-blue.svg)](https://www.gnu.org/software/emacs/)
55
[![lang: PHP 7](https://img.shields.io/badge/lang-PHP%207-brightgreen.svg)](http://php.net/manual/migration70.php)
66
[![lang: PHP 5](https://img.shields.io/badge/lang-PHP%205-green.svg)](http://php.net/downloads.php)
77
[![travis badge][travis-badge]][travis-link]
88
[![melpa badge][melpa-badge]][melpa-link]
99
[![melpa stable badge][melpa-stable-badge]][melpa-stable-link]
1010
[![GPL v3](https://img.shields.io/badge/license-GPL_v3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.txt)
1111

12-
This project updates PHP Mode for GNU Emacs with features to make it more friendly to use with PHP 5.4 and later. This fork builds on the work of:
12+
This is a major mode development project to support PHP coding in GNU Emacs.
13+
This fork builds on the work of:
1314

1415
1. Turadg Aleahmad (Original Author)
1516
2. Aaron S. Hawley
@@ -25,19 +26,70 @@ The current maintainer is:
2526

2627
Please submit any bug reports or feature requests by creating issues on [the GitHub page for PHP Mode][php-mode]. Alternatively you may also request features via [the FeatHub page][feathub] for the entire [PHP suite for GNU Emacs][php-suite].
2728

28-
2929
Installation
3030
------------
3131

3232
**PHP Mode works on Emacs 24.3 or later.** PHP Mode may work with older versions of Emacs but this is not guaranteed. Bug reports for problems related to using PHP Mode with older versions of Emacs will most like *not* be addressed.
3333

34-
With GNU Emacs 24 or later then you can use its [package][] feature to install PHP Mode from [MELPA][]. *The [Marmalade][] package repository only has the original PHP Mode from 2004.* Therefore we recommend you use MELPA to install PHP Mode. If you simply do not wish to use the package manager, then all you need to do is download the `php-mode.el` file, place it inside your `load-path`, and optionally add `(require 'php-mode)` to your Emacs configuration to automatically enable PHP Mode whenever you open a PHP file.
34+
The current support policy can be found on the [Supported Version] page.
3535

36-
Additionally, you can add `skeleton/php-ext.el` to your `load-path` to [enable the templates](https://www.gnu.org/software/emacs/manual/html_node/autotype/index.html#Top).
36+
### **(RECOMMENDED)** Install from MELPA
3737

38-
```lisp
39-
(eval-after-load 'php-mode
40-
'(require 'php-ext))
38+
[![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link]
39+
40+
With GNU Emacs 24 or later then you can use its [package][] feature (or [Cask][]) to install PHP Mode from [MELPA][] or [MELPA Stable][].
41+
42+
### Manual installation
43+
44+
Please `git cline` this project or download and unarchive tar or zip file from [php-mode releases].
45+
46+
You can choose one of the following **A**, **B**, **C** installation methods.
47+
48+
#### **A**: `(load php-mode-autoloads.el)` *(RECOMMENDED)*
49+
50+
This is an initialization method that achieves the same performance and ease of use as using a package manager.
51+
52+
By moving the downloaded file to the extracted path of the current directory and executing the `make` command, byte compilation and `php-mode-autoloads.el` is generated. Just load the file from `init.el` and you are ready to use.
53+
54+
```el
55+
;; Put follow code into init.el
56+
(when (file-directory-p "~/path/to/php-mode")
57+
(load "~/path/to/php-mode/php-mode-autoloads.el"))
58+
59+
;; Any code below is *unnecessary*
60+
;; (require 'php-mode)
61+
;; (add-to-list 'load-path (expand-file-name "~/path/to/php-mode"))
62+
;; (add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode))
63+
```
64+
#### **B**: `(autoload 'php-mode)`
65+
66+
This is for advanced users who want to reduce the slight increase in reading when Emacs starts.
67+
68+
Also in this case, it is recommended to byte compile with `make`.
69+
70+
```el
71+
;; Put follow code into init.el
72+
(autoload 'php-mode (expand-file-name "~/path/to/php-mode/php-mode") "\
73+
Major mode for editing PHP code.
74+
75+
\\{php-mode-map}
76+
77+
\(fn)" t nil)
78+
79+
(add-to-list 'auto-mode-alist '("\\.\\(?:php\\|phtml\\)\\'" . php-mode))
80+
81+
;; Any code below is *unnecessary*
82+
;; (add-to-list 'load-path (expand-file-name "~/path/to/php-mode"))
83+
;; (require 'php-mode)
84+
```
85+
86+
#### **C**: `(require 'php-mode)` *(NOT RECOMMENDED)*
87+
88+
Load `php-mode` synchronously from a specific path. It will load 10 times the size of the code compared to method **A**, and how much the startup time will depend on the performance of your machine's CPU and file system.
89+
90+
```el
91+
(require 'php-mode "~/path/to/php-mode/php-mode")
92+
(add-to-list 'load-path (expand-file-name "~/path/to/php-mode"))
4193
```
4294

4395
Reporting Bugs
@@ -282,18 +334,6 @@ The Wiki
282334

283335
The GitHub project page has a [wiki][] that you should feel free to edit. The wiki lists the features and bugs that are on plan to include in upcoming versions of PHP Mode. It is also a place to add any tips to make the mode more useful.
284336

285-
286-
The Mailing List
287-
----------------
288-
289-
The “emacs-php” mailing list is a place to discuss PHP Mode as well as all other PHP-related packages for Emacs. You can find the mailing list at:
290-
291-
1. [emacs-php at Google Groups](https://groups.google.com/forum/#!forum/emacs-php)
292-
2. [Gmane](http://dir.gmane.org/gmane.emacs.php)
293-
294-
We encourage all users of PHP Mode *and* developers of any PHP-related packages to feel free to post anything there regarding PHP and Emacs.
295-
296-
297337
License
298338
-------
299339

@@ -385,20 +425,24 @@ In chronological order:
385425
76. [Mark A. Hershberger](https://github.com/hexmode)
386426

387427

388-
[wiki]: https://github.com/emacs-php/php-mode/wiki
389-
[cc mode]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html
390-
[Subword Mode]: https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
391-
[camelCase]: http://en.wikipedia.org/wiki/Camel_case
392-
[package]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html
393-
[MELPA]: http://melpa.milkbox.net/
428+
[Cask]: https://github.com/cask/cask
429+
[MELPA Stable]: https://stable.melpa.org/
430+
[MELPA]: https://melpa.org/
394431
[Marmalade]: http://marmalade-repo.org/
432+
[Subword Mode]: https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
433+
[Supported Version]: https://github.com/emacs-php/php-mode/wiki/Supported-Version
395434
[Web Mode]: http://web-mode.org/
396-
[travis-badge]: https://travis-ci.org/emacs-php/php-mode.svg
397-
[travis-link]: https://travis-ci.org/emacs-php/php-mode
398-
[melpa-link]: http://melpa.org/#/php-mode
399-
[melpa-stable-link]: http://stable.melpa.org/#/php-mode
435+
[camelCase]: https://ja.wikipedia.org/wiki/%E3%82%AD%E3%83%A3%E3%83%A1%E3%83%AB%E3%82%B1%E3%83%BC%E3%82%B9
436+
[cc mode]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html
437+
[feathub]: https://feathub.com/emacs-php/php-suite
400438
[melpa-badge]: http://melpa.org/packages/php-mode-badge.svg
439+
[melpa-link]: http://melpa.org/#/php-mode
401440
[melpa-stable-badge]: http://stable.melpa.org/packages/php-mode-badge.svg
441+
[melpa-stable-link]: http://stable.melpa.org/#/php-mode
442+
[package]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html
402443
[php-mode]: https://github.com/emacs-php/php-mode
444+
[php-mode releases]: https://github.com/emacs-php/php-mode/releases
403445
[php-suite]: https://github.com/emacs-php/php-suite
404-
[feathub]: https://feathub.com/emacs-php/php-suite
446+
[travis-badge]: https://travis-ci.org/emacs-php/php-mode.svg
447+
[travis-link]: https://travis-ci.org/emacs-php/php-mode
448+
[wiki]: https://github.com/emacs-php/php-mode/wiki

0 commit comments

Comments
 (0)