Add php-mode-maybe and php-project-php-file-as-template #532
+142
−55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs #362
closes #483
Spec of
php-project-php-file-as-templateThis variable is expected to be set by
.dir-locals.el. You may set the value from the function added tophp-mode-maybe-hookif it is difficult to set up the.dir-locals.elfile in your project.Set this variable to just
tornilor association list(alist).If your project does not have an HTML template with a .php extension, just set
nil. Conversely, if every .php file in your project is an HTML template, you should sett.Suppose that your project has a mix of template
.phpfiles and script.phpfiles. The settings are as follows if the template file has a specific directory or regular extension.If you are not used to editing
.dir-locals.el, be careful not to break the balance of().Read Per-Directory Local Variables of Emacs manual carefully for an explanation of the
.dir-locals.elfile.An example of setting this variable to t or nil is as follows: (Don't forget
.)Note: According to the Lisp specification,
(A. (X Y Z))and(A X Y Z)have exactly the same meaning.