Setting initial indent level for PHP in Emacs?
emacs, indentation, php
Solution
Found a solution, I think:
(c-set-offset 'topmost-intro 4)
(c-set-offset 'cpp-macro -4)
Seems to be working. `topmost-intro` sets everything, and as far as I can tell `cpp-macro` only sets the `<?php` tags.
Thanks to Cheeso for the hint which led me to the answer.
Problem
I typically code my PHP with one level of indentation after the initial `<?php`, but I'm having trouble finding a setting for this in Emacs with `php-mode`. To be clear, here's what Emacs is doing: ``` <?php echo "Hello."; if (something) do_something(); ``` And here's how I usually code: ``` <?php echo "Hello."; if (something) do_something(); ``` Emacs version 23 (straight from CVS), php-mode 1.5.0.