You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the following code from the test case in this patch:
$x = some_function(__FILE__) . '';
$broken = true;
PHP Mode will indent the second line far to the right, aligning the
start of the line with the concatenation operator from the line
above it. CC Mode (which handles our indentation) indents the second
line according to the settings for `knr-argdecl'. None of the
indentation styles we provide give any value to this.
This patch modifies all of the PHP Mode indentation styles so that
`knr-argdecl' has the value of a vector with one element: the number
zero. This tells Emacs to always position the line in the first
column so that we get the actual indentation in the example above.
This approach is not bullet-proof. If we write the same two lines of
code inside of a function then CC Mode indents the second line using
something besides `knr-argdecl'. However, that does not mean there
are not other situations where it may meaningfully use `knr-argdecl'
in a situation where we do not want to start a line in the first
column of the screen. This patch fixes the specific problem of the
bug report referenced below, but there may still be corner-cases where
indentation surrounding magic constants unexpectedly breaks.
GitHub-Issue: 102
0 commit comments