#22 switch indenting

closed-fixed
None
5
2002-01-23
2001-10-22
No

Reported to me in e-mail by Craig Andrews:

Works as long as none of the lines following a 'case:'
or 'default:' start with a non-alpha char. If this is
true, the syntactic element immediately starts to
behave like a new case:, i.e. the offset is
set to -
switch($somevar) {
case 1:
do_something();
$a_var = something_else();
break;
default:
help_me();
}

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Yes, same problem here

     
  • Turadg Aleahmad

    Turadg Aleahmad - 2002-01-23
    • status: open --> closed-fixed
     
  • Turadg Aleahmad

    Turadg Aleahmad - 2002-01-23

    Logged In: YES
    user_id=137402

    This is due to following statement:
    (modify-syntax-entry ?$ "." php-mode-syntax-table)

    I don't remember why I put it in there and whatever the
    reason, I think it wasn't worth it. So I'm taking it out
    in version 1.0.2 and we'll see what people say.

     

Log in to post a comment.