[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: [patch] Ability to force indent with spaces in alignment from
From:       Leo Savernik <l.savernik () aon ! at>
Date:       2008-06-08 22:11:09
Message-ID: 200806090011.10909.l.savernik () aon ! at
[Download RAW message or body]

Am Freitag, 6. Juni 2008 schrieb Robin Pedersen:
> Variant 2: return [ <indent-spaces-count> , <alignment-virtual-column> ]
> The first element is exactly like variant 1. The second contains the  
> absolute column for alignment (counting as spaces like the first element).
>
> Example: return [ 8 , 14 ]
> Indent 8 spaces (if using tabs with a width of 4, use two tabs instead).  
> Then align by adding 14 - 8 = 6 spaces.
>
> The second element may be thought of as a "minimum" alignment. The first  
> non-whitespace character in this line must be at least 14 spaces, meaning  
> that any value less or equal to the first element is equivalent to  
> returning just the first element using variant 1.
>
> The reason that the alignment column is absolute, and not a number of  
> spaces to add to the first indent was simply because the script I was  
> working with happened to have it available as an absolute value, taken  
>  from a cursor object on the previous line.
>
> > Does this description accurately describe how you (pl) think this api
> > extension should be?
>
> I don't know why you want the first element in variant 2 to be interpreted
>   differently than the return value in variant 1. I think it would be
> better to use same value, so that these two are guaranteed to be
> equivalent:

Oh, I didn't say I want it that way, I just wanted to clarify how I understood 
the API would work. I'm ok with your solution, as long as it's properly 
documented (which it now is). And you're right, the number of spaces is more 
flexible than the indent-depth-factor, we should keep that.

Still one question: If we have, say [10, 8], what happens? Does 10 take 
precedence over 8?

mfg
	Leo

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic