From: litchi <smartlitchi@gmail.com>
Subject: Re: how to change default indent style of java source files
Date: Sat, 23 Apr 2005 09:24:56 +0800 [thread overview]
Message-ID: <20050423012456.GA3070@mail.lvying.org> (raw)
In-Reply-To: <4269285c$0$3712$39cecf19@news.twtelecom.net>
On Fri, Apr 22, 2005 at 12:36:34PM -0400, Greg Rowe wrote:
> litchi wrote:
>
> >a question is the indent style of emacs default is just like
> >public void helloWorld()
> >{
> > if(today.weather == find)
> > {
> > System.out.println("oh~ a fine day~");
> > }
> >}
> >but actually the style I expect is
> >public void helloWorld()
> >{
> > if(today.weather == find)
> > {
> > System.out.println("oh~ a fine day~");
> > }
> >}
>
> That's odd. The default coding style when I'm in java mode in emacs is
> the 'java' coding style which matches the style you are looking for.
>
> Anyhow, to change your coding style you can execute "C-c ." while emacs
> is running. Hit TAB to view a list of styles. When you find the one
> you want put the following in your .emacs:
>
> (add-hook 'java-mode (lambda ()
> (c-set-style "java"))
>
> Of course, replace "java" with the style you like best.
>
> But, if you are in java mode then your default style ought to be what
> you desire anyhow. Are you sure you don't have a mismatched paren or
> brace that might trip up the indentation scheme?
>
> Greg
But it seems doesn't work on my system
when I press C-c following by .
emacs says C-c . is undefined
I guess C-c is a personal function prefix
so maybe you bonding your own function to C-c .
Best regards
Litchi from China~~~
--
It takes a strong man to save himself, and a great man to save another.
IBM ThinkPad T23 hiweed0.6
fetchmail+procmail+mutt+msmtp vim7+emacs22+mule
next prev parent reply other threads:[~2005-04-23 1:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2548.1114155862.2895.help-gnu-emacs@gnu.org>
2005-04-22 16:36 ` how to change default indent style of java source files Greg Rowe
2005-04-23 1:24 ` litchi [this message]
2005-04-25 15:37 ` Kevin Rodgers
2005-04-26 1:18 ` litchi
[not found] ` <mailman.2987.1114478437.2895.help-gnu-emacs@gnu.org>
2005-04-26 12:02 ` Greg Rowe
2005-04-27 1:31 ` litchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050423012456.GA3070@mail.lvying.org \
--to=smartlitchi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.