Do not override variable tab-width when indenting with spaces.

The number of spaces to indent is controlled by the correctly set
variable c-offset-width. The value of tab-width does not influence
this. When indent-tabs-mode is nil, indentation is always acheived
using spaces, not tabs. The various modes set this correctly. However,
the modes that indent using spaces also override tab-width which might
undo a user's set value.

As an example, a user may prefer a literal tab (not code indentation)
be rendered as 8 spaces. And so this user would set tab-width to 8 in
init.el. All PHP modes override this value even when not using tabs
for indentation. This mean's the user's preferred tab width is altered
for no gain.

I prefer using tab-width 8 so I can quickly see when code is
incorrectly indented with tabs instead of spaces. The overriding of
this value breaks this for me. Of course, I workaround this by
re-setting tab-width in hooks, but why put the user through this in
the first place.

Coding styles that indent using tab (such as wordpress) remain
unaltered.

Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
Fix bad function call, actually a value.
README: Update my email address regarding pull requests
README: Update project status
README: Update the status
Fix indentation in single quote shell-style comments

GitHub-Issue: 144
Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
README: Add Syohei Yoshida to the list of contributors
Fix failing test case for issue 124

The test failed to search-forward to the heredoc and instead matched the
string 'heredoc' inside the comment.

Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
Add Joris Steyn to the list of contributors
Enable case sensitive search in 'with-php-mode-test'

Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
Add regression test of #144

Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
Improve Makefile for testing various Emacs

Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
Migrate font-lock and indentation to `cc-mode`

Ported from Daniel Hackney's fork https://github.com/haxney/php-mode

It looks like most of the font-lock support can be done through creative use of
`c-lang-defconst`. I am using the following files for moral guidance:

- [`yang-mode`](http://www.emacswiki.org/emacs/yang-mode.el)
- [`protobuf-mode`](http://code.google.com/p/protobuf/source/browse/trunk/editors/protobuf-mode.el)
- [`vala-mode`](https://live.gnome.org/Vala/Emacs?action=AttachFile&do=get&target=vala-mode.el)
- [`derived-mode-ex`](http://cc-mode.sourceforge.net/derived-mode-ex.el)
- [`actionscript-mode-connors`](http://www.emacswiki.org/emacs/actionscript-mode-connors.el)
- [`cuda-mode`](http://www.emacswiki.org/emacs/CudaMode)
- [`cc-php-js-cs`](http://www.mail-archive.com/gnu-emacs-sources@gnu.org/msg01804/cc-php-js-cs.el)
- [`boogie-mode`](http://www.pm.inf.ethz.ch/people/josephr/boogie-mode)
Resolve test failures and other improvements

* fix indentation for cascaded calls
* register -> as identifier ops (this solves the issue with current
  php-mode where topmost-intro is misused)
* fix indentation of inlambda (issue 29)
* support use/as statements
* restore highlighting of variables (using plain regex to accomplish
  this, this is because c-mode does no highlighting of variables, only
  of their definition - and PHP has no decl keywords for variables)
Remove list of PHP constants, use regex instead

The rationale here is that maintaining a complete list of constants is
impossible, considering the many extensions out there. We're now simply
marking all capped symbols as constants.

Also matching the class name of a static method call as constant,
c++-mode does the same.

Some remaining todo's:
 * make the namespace separator behave / look like :: in c++ mode
 * fix issue-53 or remove whitespace stripping from php-mode (recommend
 ws-trim-mode)
Support highlighting interpolated variables

Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
Merge remote-tracking branch 'Jory/work/ccmode' into cc-mode-conversion

* Jory/work/ccmode:
  Remove list of PHP constants, use regex instead
  Resolve test failures and other improvements
  Migrate font-lock and indentation to `cc-mode`
README: Add section of in-progress features
Restore support of user-customizable constants

php-extra-constants and web-mode-extra-php-constants can be used to
define additional symbols as constant, but this now only makes sense for
lower or camel-cased constants

Ideally we'd implement this using the cc-lang constructs but
c-constant-kwds does not allow user customization (c-lang-defconst). For
identifier keywords cc-mode has the *-extra-types variables but this
does not work for constant keywords.
Support T_NS_SEPARATOR in identifiers

All identifiers are recognized as words in cc-mode/php-mode, so special
care is taken to have our custom highlighting pattern for variable names
not include the separator.