Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#56 Indention problems in emacs 22

closed-out-of-date
None
7
2008-10-21
2008-01-12
stefan777
No

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

?>

Discussion

  • Charlie H.
    Charlie H.
    2008-03-17

    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.

     
    • priority: 5 --> 7
    • assigned_to: nobody --> ashawley
    • status: open --> open-accepted
     
  • 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

     
    • status: open-accepted --> closed-out-of-date