1

I can't get my Aquamacs 2.4 (Emacs) to follow the Kohana style:

Emacs in php-mode replaces tabs with spaces. I want to disable this and use tab-characters for the indention.

I tried many solutions like this, but none works for me:

(require 'php-mode)
(setq php-mode-force-pear t)
(add-hook 'php-mode-hook
      '(lambda ()
         (setq indent-tabs-mode t)
         (setq tab-width 4)
         (setq c-basic-offset 4)))

Any help appreciated.

Thanks, David

david8401
  • 379
  • 1
  • 3
  • 11

1 Answers1

0

If you are looking for tabs for indentation and spaces for alignment then you can use SmartTabs.
(---> is a tab, . is a space)

function example()
{
--->command();

--->if ($condition)
--->{
--->--->$arr = array('One',
--->--->.............'Two'); // Tabs for indent, spaces for alignment.
--->--->other_command();
--->}
}

See emacswiki and github for installation details.

Paul
  • 6,572
  • 2
  • 39
  • 51