Fix annotation highlightings on the first line of C-style comments

Consider the following code:

    /* @brief This is a function.
     * @param $foo Means something.
     */

Both annotations beginning with at-signs should use the same syntax
highlighting.  However, php-mode does not highlight ‘@brief’.  This
happens because of an issue with php-annotations-inside-comment-p.
We use that macro to determine if we are inside of a comment; more
specifically, it tells use what font-face a character has at a certain
position in the buffer.  If a character is using the face
font-lock-comment-face then we assume that character is inside of a
comment, and from there we search for annotations like ‘@brief’.

The problem is that the comment in the example above a second face we
do not test for: font-lock-comment-delimiter-face.  All of the
characters before ‘@brief’ use this face, including the whitespace.
So our macro does not recognize that we are inside of a comment until
we have already reached and passed ‘@brief’, and since we only look
ahead in the buffer from that point to find annotations we never move
backwards to actually highlight ‘@brief’ properly.

We can fix this by simply making php-annotations-inside-comment-p
aware of font-lock-comment-delimiter-face.  Then our code for
annotations will recognize the start of comments earlier and correctly
highlight the example above.

Github-issue: 58
Use `c-add-style' for specification of coding styles.

This will allow more reuse of the style support of `cc-mode'.

Signed-off-by: Eric James Michael Ritz <lobbyjones@gmail.com>
Update php-mode-modified for changes to annotations and styles
Add Daniel Hackney to the list of contributors
Create ERT-based test for issue #9.

This allows regression testing without needing manual inspection.
ERT test for issue #8.
ERT tests for issues 14, 16, and 18
ERT test for ejmr/php-mode#19
Require `php-mode` in `php-mode-test.el`, duh.
ERT tests for remaining example files.

This should close ejmr/php-mode#60
Mark tests 9, 14, and 19 as expected failures.

This makes all tests pass or fail expectedly for the current version. As bugs
are fixed, the expectation of failure can be removed.
Simplify setting `php-file-patterns` with `mapc`

Rather than a `while` loop, use the functionalerific `mapc` to add file-name
patterns to `auto-mode-alist`.

Signed-off-by: Eric James Michael Ritz <lobbyjones@gmail.com>
Define `php-mode-map` in a `defvar`, as is the recommended style.

See Tips for Defining(elisp).

Signed-off-by: Eric James Michael Ritz <lobbyjones@gmail.com>
Merge branch 'haxney/ert-tests'

* haxney/ert-tests:
  Mark tests 9, 14, and 19 as expected failures.
  ERT tests for remaining example files.
  Require `php-mode` in `php-mode-test.el`, duh.
  ERT test for ejmr/php-mode#19
  ERT tests for issues 14, 16, and 18
  ERT test for issue #8.
  Create ERT-based test for issue #9.
Add documentation about the automated unit tests to the README
Update php-mode-modified for the new automated unit tests
Do not override font-lock for case/continue/break labels

This prevents us from displaying words following "case", "continue",
and "break" in unexpected faces inside comments.

Signed-off-by: Eric James Michael Ritz <lobbyjones@gmail.com>
Do not highling function calls or variables within comments

This addresses the same issue as commit 4a7a6b0b.  We often use
regular expressions to capture parts of code and apply syntax
highlighting to those captured groups via font-lock definitions like
this:

    (1 font-lock-variable-name-face t t)

That third parameter causes a problem.  That controls the ‘override’
properties meaning, in this case, that Emacs will apply the face
font-lock-variable-name-face to whatever we capture even if it already
has syntax highlighting.  It overrides existing faces.  That behavior
causes comments like

    // $foo->bar

to have syntax highlighting for ‘bar’ like any other variable.  We can
fix this by changing the override parameter to ‘keep’, which tells
font-lock to keep any existing face.  Or to put it another way, to
only apply the face if none is already there.  This fixes the issue
with comments since they are highlighting before we try to
highlighting variables, function calls, et cetera.
Update php-mode-modified for today’s syntax and font-lock changes