Skip to main content
markup
Source Link
Stefan
  • 26.7k
  • 3
  • 52
  • 88

This code in .emacs did the job:

(add-hook 'php-mode-hook (lambda () (make-local-variable 'c-basic-offset) (setq c-basic-offset 2)))

(add-hook 'php-mode-hook
      (lambda ()
        (make-local-variable 'c-basic-offset)
        (setq c-basic-offset 2)))

I failed previously because I tried to change the global c-basic-offsetc-basic-offset. That didn't help as the local variable generated in php-mode took precedence (I think).

This code in .emacs did the job:

(add-hook 'php-mode-hook (lambda () (make-local-variable 'c-basic-offset) (setq c-basic-offset 2)))

I failed previously because I tried to change the global c-basic-offset. That didn't help as the local variable generated in php-mode took precedence (I think).

This code in .emacs did the job:

(add-hook 'php-mode-hook
      (lambda ()
        (make-local-variable 'c-basic-offset)
        (setq c-basic-offset 2)))

I failed previously because I tried to change the global c-basic-offset. That didn't help as the local variable generated in php-mode took precedence (I think).

Source Link

This code in .emacs did the job:

(add-hook 'php-mode-hook (lambda () (make-local-variable 'c-basic-offset) (setq c-basic-offset 2)))

I failed previously because I tried to change the global c-basic-offset. That didn't help as the local variable generated in php-mode took precedence (I think).