Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this indentation of multi-line argument lists expected? #128

Open
joddie opened this issue Sep 7, 2013 · 3 comments
Open

Is this indentation of multi-line argument lists expected? #128

joddie opened this issue Sep 7, 2013 · 3 comments
Labels

Comments

@joddie
Copy link

joddie commented Sep 7, 2013

Hi,
I install php-mode from MELPA and usually have the most recent master version (GNU Emacs 24.3.1, php mode-version 1.12, package version 20130902.1944).

Sometime in the last week it seems like indentation of function argument lists that span lines has changed. However, since I haven't explicitly set php-mode's coding style in the past, I am not sure whether this is a bug or user error on my part.

If I open a new file and type

some_function($foo,
$bar,
$baz);

then indent with TAB or C-M-, the second and third arguments remain at the left margin, when I had expected them to be lined up with $foo. This happens when c-set-style is pear, symfony2, wordpress. In drupal style the 2nd & 3rd arguments are indented by two spaces.

After looking briefly at the PEAR standards, it seems like they encourage either all arguments on one line, or putting a newline after the open paren, so now I am wondering if I have been doing argument lists wrong all this time ;-) Is the above the expected behavior?

@ejmr
Copy link
Collaborator

ejmr commented Sep 7, 2013

Thank you for the bug report. The behavior is an error and not what we expect. I am going to make a unit test of this and work on fixing it for PHP Mode's four built-in styles. In the meantime if you use the linux style then the arguments will line-up.

@ejmr
Copy link
Collaborator

ejmr commented Sep 7, 2013

Note to self: Creating the unit test for this will likely require addressing #122 first.

@joddie
Copy link
Author

joddie commented Sep 8, 2013

Thank you for the quick response! Let me know if I can help in tracking down the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants