There are still indention issues with 1.4.0beta and emacs 22.
Reproduce: edit the provided sample code and go through the lines with TAB or use "indent-region". The problematic lines are marked with comments.
All problems seem to be caused by the "<?php" start tag (deleting that line leads to a correct indention).
<?php
// first comment line: indent=2, should be 0 here
$test = 1; // indent=0 (correct)
// comment line after some code: indent=0 (correct)
function test($test) {
$x = 1;
} // closing curly bracket of first function: indent=2, should be 0 here
function test2($test) {
$x = 1;
} // second closing curly bracket: indent=0 is correct here
?>
Logged In: YES
user_id=1182725
Originator: NO
I'm having the exact same problem, and I've been unable to track it down in the code. Any resolution?
Logged In: YES
user_id=25294
Originator: NO
I can confirm both. For the second, many people follow the PEAR coding standards for function defintions and don't see this problem.
<http://pear.php.net/manual/en/standards.funcdef.php>
I'll try to fix it, though.
I'm not see this anymore with:
The version of php-mode.el in Subversion.
Using CC Mode version 5.31.5
GNU Emacs 22.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.12.9) of 2008-05-23