help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C style comments


From: Peter Collingbourne
Subject: C style comments
Date: 18 Feb 2004 17:24:53 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93

Hello

I am new to Emacs and I am trying to get C style comments in Java. I.e.
/*
 *
 */

The below .emacs file works when the comment is not indented, but when there
is an indent before the code I am commenting I get something like this
        /*
 * 
 */
i.e. there is no indent on the lines after the first one. I use M-; to open
a comment and M-C-j to go the next line.

Here's my .emacs

(defun my-indent-setup ()
  (setq c-basic-offset 8)
  (setq indent-tabs-mode t)
  (setq comment-multi-line t)
  (setq comment-start "/*")
  (setq fill-prefix   " * ")
  (setq comment-end   " */")
)

(add-hook 'java-mode-hook 'my-indent-setup)

-- 
Peter


reply via email to

[Prev in Thread] Current Thread [Next in Thread]