#56 Indention problems in emacs 22


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).


// 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



  • Charlie H.

    Charlie H. - 2008-03-17

    Logged In: YES
    Originator: NO

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

  • Aaron S. Hawley

    Aaron S. Hawley - 2008-04-07

    Logged In: YES
    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.


    I'll try to fix it, though.

  • Aaron S. Hawley

    Aaron S. Hawley - 2008-04-07
    • priority: 5 --> 7
    • assigned_to: nobody --> ashawley
    • status: open --> open-accepted
  • Aaron S. Hawley

    Aaron S. Hawley - 2008-10-21

    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

  • Aaron S. Hawley

    Aaron S. Hawley - 2008-10-21
    • status: open-accepted --> closed-out-of-date

Log in to post a comment.