Menu

#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?

     
  • Aaron S. Hawley

    Aaron S. Hawley - 2008-04-07

    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.

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

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.