I need to use google style indentation in Java Application. I was given code to add to my .emacs file but its not working.
When I run the checkstyle code, it gives me tab errors.
This is what my .emacs file contains:
;; .emacs
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(diff-switches "-u")
'(inhibit-startup-screen t))
;;; uncomment for CJK utf-8 support for non-Asian users
;; (require 'un-define)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;;; google conformant indentation for java
(add-hook 'java-mode-hook
(lambda ()
(progn
(setq c-basic-offset 2)
(c-set-offset 'case-label '+)
(c-set-offset 'statement-cont '++))))
Could you please tell me what's wrong, or point me to a file i got replace it with?