[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indentation and visual-line-mode
From: |
Tassilo Horn |
Subject: |
Re: Indentation and visual-line-mode |
Date: |
Fri, 25 Nov 2011 16:15:31 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>>>> (assuming you never want to change the indentation during editing).
>>> A while ago there was a thread about implementing a minor mode to get
>>> visual indentation with wrap-prefix using fill-context-prefix, in
>>> which I proposed an adaptation of the above; see
>>> <http://permalink.gmane.org/gmane.emacs.devel/125268>. AFAIK there
>>> was no followup to my proposal.
>
> Indeed I didn't find the time to look at it and it ended up on my long
> list of "things to do when hell finally freezes over".
Hell's already frozen over:
http://researchmaniacs.com/Jokes/HellExplained.html
>> I've just tried that code, and it's exactly what I've been looking for.
>
> I've just looked at it and it looks really nice and simple. It can
> even be simplified further (see below).
>
> Sadly, this can't be generalized to programming languages, in the
> sense that you can't use foo-indent-calculate to set a wrap-prefix
> property since the wrap-prefix to use depends on the place where the
> line is wrapped.
But usually, there are no overly long lines in source code.
>> I'd appreciate if that feature would ship with Emacs.
>
> It's too late for 24.1, but I've added it (under name "awp-mode.el"
> which provides adaptive-wrap-prefix-mode) to ELPA.
Awesome, thank you.
Bye,
Tassilo
--
(What the world needs (I think) is not
(a Lisp (with fewer parentheses))
but (an English (with more.)))
Brian Hayes, http://tinyurl.com/3y9l2kf
Re: Indentation and visual-line-mode, Lennart Borgman, 2011/11/25
Re: Indentation and visual-line-mode, Stefan Monnier, 2011/11/25