Skip to content

Commit e1c5d2d

Browse files
committed
Revised the introductory sentence and installation method of README
1 parent d653e75 commit e1c5d2d

File tree

2 files changed

+156
-41
lines changed

2 files changed

+156
-41
lines changed

README.ja.md

Lines changed: 82 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,90 @@ PHP Mode for GNU Emacs
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-
PHP 5.4以降を開発しやすくするための機能をアップデートするプロジェクトです。これは以下の人々の作業をもとにフォークされました。
12+
GNU EmacsでのPHPコーディングを支援するメジャーモードの開発プロジェクトです。
13+
これまで、以下の人々の作業をもとにフォークされました。
1314

14-
1. Turadg Aleahmad (Original Author)
15-
2. Aaron S. Hawley
16-
3. Lennart Borgman
17-
4. Eric James Michael Ritz
18-
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
1920

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

2223
現在のメンテナ:
2324

24-
1. USAMI Kenta (@zonuexe)
25+
1. USAMI Kenta (@zonuexe)
2526

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

2829
インストール
2930
------------
3031

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

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

35-
さらに`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]
3637

37-
```lisp
38-
(eval-after-load 'php-mode
39-
'(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"))
4090
```
4191

92+
### **(不可)** Marmalade
93+
94+
[Marmalade][]パッケージリポジトリは、もはや維持されていないので**設定の削除を推奨します**。また、このリポジトリには2004年のオリジナル版PHPモードしか登録されていませんでした。
95+
4296
バグを報告する
4397
--------------
4498

@@ -317,20 +371,24 @@ Contributors
317371

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

320-
[wiki]: https://github.com/emacs-php/php-mode/wiki
321-
[cc mode]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html
322-
[Subword Mode]: https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
323-
[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
324-
[package]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html
325-
[MELPA]: http://melpa.milkbox.net/
374+
[Cask]: https://github.com/cask/cask
375+
[MELPA Stable]: https://stable.melpa.org/
376+
[MELPA]: https://melpa.org/
326377
[Marmalade]: http://marmalade-repo.org/
378+
[Subword Mode]: https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
379+
[Supported Version]: https://github.com/emacs-php/php-mode/wiki/Supported-Version
327380
[Web Mode]: http://web-mode.org/
328-
[travis-badge]: https://travis-ci.org/emacs-php/php-mode.svg
329-
[travis-link]: https://travis-ci.org/emacs-php/php-mode
330-
[melpa-link]: http://melpa.org/#/php-mode
331-
[melpa-stable-link]: http://stable.melpa.org/#/php-mode
381+
[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
382+
[cc mode]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html
383+
[feathub]: https://feathub.com/emacs-php/php-suite
332384
[melpa-badge]: http://melpa.org/packages/php-mode-badge.svg
385+
[melpa-link]: http://melpa.org/#/php-mode
333386
[melpa-stable-badge]: http://stable.melpa.org/packages/php-mode-badge.svg
387+
[melpa-stable-link]: http://stable.melpa.org/#/php-mode
388+
[package]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html
334389
[php-mode]: https://github.com/emacs-php/php-mode
390+
[php-mode releases]: https://github.com/emacs-php/php-mode/releases
335391
[php-suite]: https://github.com/emacs-php/php-suite
336-
[feathub]: https://feathub.com/emacs-php/php-suite
392+
[travis-badge]: https://travis-ci.org/emacs-php/php-mode.svg
393+
[travis-link]: https://travis-ci.org/emacs-php/php-mode
394+
[wiki]: https://github.com/emacs-php/php-mode/wiki

README.md

Lines changed: 74 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ PHP Mode for GNU Emacs
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
@@ -30,15 +31,67 @@ Installation
3031

3132
**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.
3233

33-
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+
### **(RECOMMENDED)** Install from MELPA
3435

35-
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+
[![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link]
3637

37-
```lisp
38-
(eval-after-load 'php-mode
39-
'(require 'php-ext))
38+
With GNU Emacs 24 or later then you can use its [package][] feature (or [Cask][]) to install PHP Mode from [MELPA][] or [MELPA Stable][].
39+
40+
### Manual installation
41+
42+
Please `git cline` this project or download and unarchive tar or zip file from [php-mode releases].
43+
44+
#### **A**: `(load php-mode-autoloads.el)` *(RECOMMENDED)*
45+
46+
This is an initialization method that achieves the same performance and ease of use as using a package manager.
47+
48+
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.
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+
#### **B**: `(autoload 'php-mode)`
61+
62+
This is for advanced users who want to reduce the slight increase in reading when Emacs starts.
63+
64+
Also in this case, it is recommended to byte compile with `make`.
65+
66+
```el
67+
;; Put follow code into init.el
68+
(autoload 'php-mode (expand-file-name "~/path/to/php-mode/php-mode") "\
69+
Major mode for editing PHP code.
70+
71+
\\{php-mode-map}
72+
73+
\(fn)" t nil)
74+
75+
(add-to-list 'auto-mode-alist '("\\.\\(?:php\\|phtml\\)\\'" . php-mode))
76+
77+
;; Any code below is *unnecessary*
78+
;; (add-to-list 'load-path (expand-file-name "~/path/to/php-mode"))
79+
;; (require 'php-mode)
80+
```
81+
82+
#### **C**: `(require 'php-mode)` *(非推奨)*
83+
84+
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.
85+
86+
```el
87+
(require 'php-mode "~/path/to/php-mode/php-mode")
88+
(add-to-list 'load-path (expand-file-name "~/path/to/php-mode"))
4089
```
4190

91+
### **(不可)** Marmalade
92+
93+
[Marmalade][]パッケージリポジトリは、もはや維持されていないので**設定の削除を推奨します**。また、このリポジトリには2004年のオリジナル版PHPモードしか登録されていませんでした。
94+
4295
Reporting Bugs
4396
--------------
4497

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

374427

375-
[wiki]: https://github.com/emacs-php/php-mode/wiki
376-
[cc mode]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html
377-
[Subword Mode]: https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
378-
[camelCase]: http://en.wikipedia.org/wiki/Camel_case
379-
[package]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html
380-
[MELPA]: http://melpa.milkbox.net/
428+
[Cask]: https://github.com/cask/cask
429+
[MELPA Stable]: https://stable.melpa.org/
430+
[MELPA]: https://melpa.org/
381431
[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
382434
[Web Mode]: http://web-mode.org/
383-
[travis-badge]: https://travis-ci.org/emacs-php/php-mode.svg
384-
[travis-link]: https://travis-ci.org/emacs-php/php-mode
385-
[melpa-link]: http://melpa.org/#/php-mode
386-
[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
387438
[melpa-badge]: http://melpa.org/packages/php-mode-badge.svg
439+
[melpa-link]: http://melpa.org/#/php-mode
388440
[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
389443
[php-mode]: https://github.com/emacs-php/php-mode
444+
[php-mode releases]: https://github.com/emacs-php/php-mode/releases
390445
[php-suite]: https://github.com/emacs-php/php-suite
391-
[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)