Share

PHP mode for Emacs

Tracker: Bugs

7 Indention problems in emacs 22 - ID: 1870017
Last Update: Comment added ( ashawley )

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


?>


stefan777 ( stefan777 ) - 2008-01-12 18:30

7

Closed

Out of Date

Aaron S. Hawley

None

None

Public


Comments ( 3 )




Date: 2008-10-21 17:26
Sender: ashawleyProject Admin

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




Date: 2008-04-07 04:23
Sender: ashawleyProject Admin


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.



Date: 2008-03-17 21:04
Sender: freediver


I'm having the exact same problem, and I've been unable to track it down
in the code. Any resolution?


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 6 )

Field Old Value Date By
status_id Open 2008-10-21 17:26 ashawley
resolution_id Accepted 2008-10-21 17:26 ashawley
close_date - 2008-10-21 17:26 ashawley
resolution_id None 2008-04-07 04:23 ashawley
priority 5 2008-04-07 04:23 ashawley
assigned_to nobody 2008-04-07 04:23 ashawley