From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: auto-fill mode in java-mode Date: Thu, 16 Oct 2003 21:16:58 +0000 Organization: muc.de e.V. -- private internet access Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1066373447 21576 80.91.224.253 (17 Oct 2003 06:50:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Oct 2003 06:50:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 17 08:50:44 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 1AAORf-0007ME-00 for ; Fri, 17 Oct 2003 08:50:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AAONC-0001lc-B8 for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Oct 2003 02:46:06 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.space.net!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1066371782 60591 193.149.49.134 (17 Oct 2003 06:23:02 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 17 Oct 2003 06:23:02 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:117349 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:13280 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13280 Adam Hardy wrote on Mon, 13 Oct 2003 23:58:08 +0200: > On 10/13/2003 11:10 AM Alan Mackenzie wrote: >>>I'm trying to get my java-mode to wrap lines at 75 cols and I've not >>>got it working. [ .... ] >> I'm not sure how useful the auto-filling is in lines other than >> comment lines. [ .... ] > There is only one quibble that I have with the arrangement as I now > have it, and the cc-mode help, which is great, is not telling me how or > why it happens: > - when auto-fill breaks a line, it ignores my idea of what the > indentation should be. I have to hit tab (or an electric key) for the > indentation to sort itself out. I assume my settings are in need of > some adjustment, but I don't know which of the following it is: [ settings snipped ] I don't think there's any code in CC Mode to re-indent auto-filled stuff (apart from comments). It's one of these things that "nobody" will ever really need (Hah!), and nobody can be bothered to code. The variable c-ignore-auto-fill seems more like an emergency kludge than a fully worked out facility. If you think about it, auto-fill with reindentation would be complicated - The Java code could be filled, then reindented, causing it to spill over the right margin, requiring re-filling, then reindentation, ..... It would probably end up looking like an Outlook-Express Usenet posting. :-( You could always reindent the code with C-M-\ or C-M-q or something. But that will ruin the 75 column limit. :-( There probably isn't a good solution to this (other than to enhance CC Mode). Sorry. > Adam -- Alan Mackenzie (Munich, Germany) Email: aacm@muuc.dee; to decode, wherever there is a repeated letter (like "aa"), remove half of them (leaving, say, "a").