emacs-devel
[Top][All Lists]
Advanced

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

Re: Variable-width font indentation


From: Eli Zaretskii
Subject: Re: Variable-width font indentation
Date: Wed, 07 Mar 2018 19:22:37 +0200

> Cc: address@hidden, address@hidden
> From: Clément Pit-Claudel <address@hidden>
> Date: Tue, 6 Mar 2018 16:47:51 -0500
> 
> > I don't see a need for such a feature, sorry.  We have indentation
> > already; its only problem is that it doesn't work well with variable
> > pitch fonts.  That's what we need to try to fix, if we care about the
> > capability of displaying program code with such fonts.
> 
> I'm thoroughly confused: doesn't the algorithm that Paul proposed, and that I 
> show an implementation of, do exactly that?

Not AFAIU, no.  It is an implementation of a different indentation
method.  I don't see why we should want to go that way, since there's
nothing wrong with the existing algorithm, except for handling of
variable-pitch fonts.

> Do you want to get the indentation code involved because the heuristic isn't 
> perfect?

More like because the existing indentation algorithms are okay, and I
see no need to change them to something else.

> In your world, concretely, what happens when I open xdisp.c and press M-x 
> variable-pitch-mode? Does everything look misaligned until I M-x 
> indent-region the whole file?

Yes.  It isn't different from what happens when you change tab-width.

> What about a file from a different project that uses a different indenting 
> convention?

Not sure how that is relevant.  A different indentation convention
will look differently, of course.



reply via email to

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