[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auto-fill mode in java-mode
From: |
Alan Mackenzie |
Subject: |
Re: auto-fill mode in java-mode |
Date: |
Thu, 16 Oct 2003 21:16:58 +0000 |
User-agent: |
tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) |
Adam Hardy <emacs@cyberspaceroad.com> 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").