From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.help Subject: Re: indentation of java inner classes Date: Sun, 26 Oct 2003 16:48:28 +0000 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <8765icymg3.fsf@www.emptydomain.de> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067187760 3740 80.91.224.253 (26 Oct 2003 17:02:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Oct 2003 17:02:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 26 18:02:38 2003 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 1ADoHm-0005SL-00 for ; Sun, 26 Oct 2003 18:02:38 +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 1ADoHT-0007RD-6i for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Oct 2003 12:02:19 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!npeer.de.kpn-eurorings.net!fu-berlin.de!uni-berlin.de!213-203-244-156.kunde.vdserver.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: 213-203-244-156.kunde.vdserver.de (213.203.244.156) Original-X-Trace: news.uni-berlin.de 1067186917 34641402 213.203.244.156 (16 [73968]) User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:FmwHKSluq5LXfLvIMoQNgRFYb1g= Original-Xref: shelby.stanford.edu gnu.emacs.help:117622 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:13554 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13554 Trevor Spiteri writes: > Some code is indented as follows: > [...] > How do I make it indent as follows? Can't say, but the general approach is to say C-c C-o on the first line which has wrong indentation, then follow the prompts. Then hit TAB to reindent to see what happened. Repeat until you like that line's indentation, then proceed to the next line. Using C-x ESC ESC and then M-p/M-n you can recall the c-set-offset statements which you can just copy and paste into the following Lisp snippet: (defun ts-java-mode-hook () (c-set-offset ...) (c-set-offset ...)) (add-hook 'java-mode-hook 'ts-java-mode-hook) Kai