Dustin Lang <[EMAIL PROTECTED]> writes:
> I've decided to give Emacs a try (I normally use pico :) for my java
> development (my full-time job). Can anyone tell me how to set the
> character emacs uses to indent? Right now it's using two spaces as a tab.
> I'm a believer in the a-tab-is-a-tab axiom of indentation :)
I have used XEmacs for quite some time and am very happy with it. FSF
Emacs is also good.
I use the CC Mode which is the "mode for editing files containing C, C++,
Objective-C, Java, and CORBA IDL code". This is the standard thing for
XEmacs and FSF Emacs. If for some reason your online docs aren't installed
correctly, you can look at http://www.python.org/emacs/cc-mode/
Typically, hitting the TAB key in an emacs editing mode doesn't mean
'insert ^I here', it means 'indent this line the appropriate amount
for this programming language'. Here's an abbreviated version of what
I have in my .emacs file:
(defun my-c-mode-common-hook ()
(c-set-style "GNU")
(setq c-tab-always-indent nil)
(setq c-basic-offset 4))
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
I'm not sure if this would work, but you could try changing this to
get your "tab is a tab" behaviour:
(defun my-c-mode-common-hook ()
(c-set-style "GNU")
(setq c-tab-always-indent nil)
(setq c-basic-offset 8))
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
Good luck,
Chris Dean