unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* indentation of java inner classes
@ 2003-10-02 10:10 Trevor Spiteri
  0 siblings, 0 replies; 2+ messages in thread
From: Trevor Spiteri @ 2003-10-02 10:10 UTC (permalink / raw)


Some code is indented as follows:

Runnable r = new Runnable () {
        public void run () {
        }
    };

How do I make it indent as follows?

Runnable r = new Runnable () {
    public void run () {
    }
};

Thanks

Trevor

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: indentation of java inner classes
       [not found] <mailman.999.1065090235.21628.help-gnu-emacs@gnu.org>
@ 2003-10-26 16:48 ` Kai Grossjohann
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Grossjohann @ 2003-10-26 16:48 UTC (permalink / raw)


Trevor Spiteri <tspiteri@ieee.org> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-26 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-02 10:10 indentation of java inner classes Trevor Spiteri
     [not found] <mailman.999.1065090235.21628.help-gnu-emacs@gnu.org>
2003-10-26 16:48 ` Kai Grossjohann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).