From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Peter Collingbourne Newsgroups: gmane.emacs.help Subject: C style comments Date: 18 Feb 2004 17:24:53 +0000 Organization: Department of Computing, Imperial College, London Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077127002 4428 80.91.224.253 (18 Feb 2004 17:56:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Feb 2004 17:56:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 18 18:56:30 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AtVvy-000696-00 for ; Wed, 18 Feb 2004 18:56:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AtVeA-0000b3-B5 for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Feb 2004 12:38:06 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!logbridge.uoregon.edu!server3.netnews.ja.net!news.doc.ic.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: texel31.doc.ic.ac.uk Original-X-Trace: harrier.doc.ic.ac.uk 1077125094 17297 146.169.49.80 (18 Feb 2004 17:24:54 GMT) Original-X-Complaints-To: abuse@doc.ic.ac.uk Original-NNTP-Posting-Date: Wed, 18 Feb 2004 17:24:54 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93 Original-Xref: shelby.stanford.edu gnu.emacs.help:121024 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16975 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16975 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