arnested / drupal-mode

Advanced Emacs minor mode for Drupal development
https://melpa.org/#/drupal-mode
GNU General Public License v3.0
32 stars 14 forks source link

Access protection keywords in class methods confuse indentation #59

Closed openprivacy closed 9 years ago

openprivacy commented 9 years ago

Given a class method like the following:

  public function foo() {
           // indent comes to here, two spaces past the beginning of 'function'.

It seems that public/private/protected keywords should be easily ignored as php-mode.el contains the code:

(c-lang-defconst c-protection-kwds
  "Access protection label keywords in classes."
  php '("private" "protected" "public"))

Is this just me, or are others seeing this, too?

Any ideas? (BTW: the rest of the package is so awesome I use it anyway...)

Running all the latest emacs and packages on Arch GNU/Linux.

openprivacy commented 9 years ago

Urg - apologies. This is likely a php-mode issue (though I can't find it).

arnested commented 9 years ago

No apologies needed. I am the one causing the problem - the indentation works fine in plain php-mode but not drupal-mode.

I am working on a fix right now. Stay tuned.

arnested commented 9 years ago

@openprivacy, this should be fixed now. Thank you for reporting this!

openprivacy commented 9 years ago

Thank you for the quick fix - works great!