From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: ad Newsgroups: gmane.emacs.help Subject: Re: indentation in jde/java mode Date: Mon, 26 Apr 2004 22:15:51 -0400 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1083032402 3253 80.91.224.253 (27 Apr 2004 02:20:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Apr 2004 02:20:02 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 27 04:19:53 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 1BIICO-0004Ds-00 for ; Tue, 27 Apr 2004 04:19:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BII8K-0001wG-Mo for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Apr 2004 22:15:40 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!216.196.106.140!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!nntp.adelphia.com!news.adelphia.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Mon, 26 Apr 2004 21:14:27 -0500 User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: 69.168.115.142 Original-X-Trace: sv3-LIxdlsp2SvdzxMxWe5X8hxjaCaAHxQJe1e5WXmd3EYzT+WnWXmgNP6ycJ7cHADR5xx1TjyuyAHDoALZ!Tk3zUJKgWeSN76VW/GSakxsuvtTAXPqsPEwOCIRJaur48jxKLhhklfW58qS5LNuzodZDd0AX2P0W!AiDqvw9PIlIQ6IZbZOOpojE= Original-X-Complaints-To: abuse@adelphia.net X-DMCA-Complaints-To: copyright@adelphia.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:122740 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 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:18028 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:18028 On Mon, 26 Apr 2004 08:30:36 +0000, Alan Mackenzie wrote: > ad wrote on Sun, 25 Apr 2004 23:07:01 -0400: >> Hi, > >> I am running "GNU Emacs 21.3.1" in my debian box. I have the following >> in my ".emacs" file to use 2 char indentation for my java files: > >> (defun my-jde-mode-hook () >> (setq c-basic-offset 2)) > >> (add-hook 'jde-mode-hook 'my-jde-mode-hook) >> (add-hook 'java-mode-hook 'my-jde-mode-hook) > > >> This seems to be working fine when I edit/view files with emacs, but >> when I look at the files with other editors or viewers, like "less", I >> see the indentation is actually 8. > >> It seems like when the file is saved, the indentation is changing to >> 8. > >> Am I doing something wrong within my ".emacs"? > > Quick question: are you sure that your indentation is done with two > spaces, and not with a TAB, tab-width having somehow been set to 2? > >> Thank you. While I am writing the code and get to the new-line and hit TAB, the cursor does not move, but when I finished the line with ";" or having a "." (dot) in the line (example (aClass.method), does the indentation automatically, and it looks by 2 chars. I also tend to use "Java -> Indent Expression" menu selection quite often which also looks like indenting by 2 chars. All the indentation looks just fine (2-chars) within the emacs, but opening with other editors (even "less") is making it look like it was indented by 8 chars. Because of this, I get some complaints from my colleagues that are using xemacs. Thank you again