-
Notifications
You must be signed in to change notification settings - Fork 117
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
Indent about Chained Method Calls #43
Comments
Sorry but I cannot duplicate this. If I take your example and run |
@ejmr i use TAB or C-j to indent next line. i will check emacs version and php-mode version later. thank you for the patience. |
php-mode-version: PHP mode 1.5.0-nxhtml-1.94 of 2009-08-12 i can not excute `php-mode-modified' command, but i opened php-mode.el and get things like below:
are these all right? |
Thank you, that is very helpful :) Also, |
hi, @ejmr have you duplicated this? |
Sorry @cnwggu but not yet, unfortunately. I will continue to work on tracking down the problem though. |
I can replicate this problem now, so that is one step towards fixing it. :) |
@ejmr you are so nice |
@cnwggu Thanks :) So here is the problem. There are lots of calls to i am thinking a solution may be to write a 'custom line-up function' (section 11.4 of the CC Mode manual) which looks at the previous line and decides whether or not to use the foreach ($x as $y)
echo $y; But if anyone knows a more simple solution, or sees a problem with my approach, I would greatly appreciate the feedback. |
@ejmr seems there is no better solutions for this, huh? |
There probably is a better solution since I am no expert with Elisp, but the approach I described above is what I am going to work on implementing. I will try to patch php-mode to fix this problem in the next few days. |
i never write elisp before. so it's kind of difficult for me |
That's ok @cnwggu because I was not trying to ask you to write the patch. I was only explaining the approach I intend to take and give insight for any others who may have a better idea than mine. I will try to write the Elisp to fix this problem in the next week, but with it being Christmas in the United States I may not have the time. |
@ejmr heh, Merry Christmas eve and Christmas day. |
Thank you @cnwggu :) And the same to you as well, and to everyone else who helps me work on php-mode. Thank you everyone. |
I applied a patch to my local copy of |
hey, there is another indentation problem.
it should be indented align with "->", but actually, it will not, just 4 chars indentation. codes:
The text was updated successfully, but these errors were encountered: