Subject: bug#22847: #17062: 24.3 current-fill-column breaks fill-match-adaptive-prefix

From: Eli Zaretskii <[email-masked]>
Date: Mon, 29 Feb 2016 17:56:54 +0200

> From: Andreas Röhler <[email-masked]>
> Date: Mon, 29 Feb 2016 08:33:23 +0100
> 
> fill-match-adaptive-prefix counts on current-fill-column having:
> 
> (>= (+ (current-left-margin) (length str)) (current-fill-column))
> 
> This will be broken if current-fill-column returns nil.
> 
> Returning nil is possible, see inside current-fill-column:
> 
> (if fill-column
> 
> If fill-column is nil, current-fill-column will return nil which was the case coming upon.
> A fix might make sure an integer is returned anyway: think at 0 or default value.

While at that, please also fix the calculation of string length: it
should use 'string-width', not 'length', IMO.