emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable-width font indentation


From: Daniel Colascione
Subject: Re: Variable-width font indentation
Date: Mon, 5 Mar 2018 21:48:01 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/05/2018 06:04 PM, Paul Eggert wrote:
On 03/05/2018 05:40 PM, Clément Pit-Claudel wrote:
I've tested it on two files: src/termcap.c and lisp/dabbrev.el.  To try it out, open one of these files in emacs -Q, then run M-x ~/variable-pitch-indent, and then M-x variable-pitch-mode.

I do agree that it doesn't look too bad, and presumably a C implementation of the algorithm above would be very fast, since it could build the "spine" above during redisplay.

Thanks, that was fast! Yes, it should work fast.

I saw one easily-fixable minor glitch (on my screen lisp/dabbr.el line 533 had the wrong indent, presumably since the "user-error" on the previous line was in a fatter-than usual font).

Right. Given sufficiently divergent character widgets, it'd be possible to trick the eye into thinking two blocks of code at semantically different indentation levels are in fact at different levels, or vice versa. IMHO, that's dangerous. I'd rather whitelist modes where the indentation machinery can reliably provide robust alignment-versus-indentation information.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]