emacs-php / emacs-php/php-mode

Is this indentation of multi-line argument lists expected?

Open
#128 3 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Emacs Lisp
Stars
602
Forks
117
Avg merge
12h 54m
Merged PRs (30d)
3

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.