Thursday, 16 July 2009

Java 1.5 and Emacs

While trying out the Restlet tutorial, I thought it time to fix Emacs Java mode to correctly indent annotations. Found a post from Ben Tomasini which fixes it: (add-hook 'java-mode-hook '(lambda () "Treat Java 1.5 @-style annotations as comments." (setq c-comment-start-regexp "(@|/(/|[*][*]?))") (modify-syntax-entry ?@ "< b" java-mode-syntax-table))) Adding that to your .emacs file.

No comments:

Post a Comment