Menu

#15 top-level indentation is wacky

open
nobody
indentation (1)
5
2013-07-07
2013-07-07
No

I put the following code in:

<?php
$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR;
                         require_once $dir . 'config.php';

The indentation for lines following my $dir = line seems to be based on where the . shows up in the $dir = line. My current workaround is to put everything into a block, like:

<?php
{
  $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR;
  require_once $dir . 'config.php';
}

Why does the behaviour I show in the first example happen? Are there any other workarounds than to put my global code in a block (which just looks wrong and is changing code to suite the editor instead of the other way around. In fact, I haven’t checked yet, but it may possibly mess with global scope...)?

I am running php-mode-1.5.0 on emacs-24.3.1.

Discussion


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.