GNU bug report logs -
#15155
24.3; wrap-prefix in adaptive-wrap-prefix-mode with variable-pitch has wrong face
Previous Next
Full log
View this message in rfc822 format
> Date: Thu, 22 Aug 2013 09:04:12 +0200
> From: Frank Fischer <frank.fischer <at> mathematik.tu-chemnitz.de>
> Cc: 15155 <at> debbugs.gnu.org
>
> Taking your hint, I have tried the following `adaptive-fill-function`
>
> (setq adaptive-fill-function
> (lambda ()
> (and adaptive-fill-prefix
> (looking-at adaptive-fill-prefix)
> (match-string 0))))
>
> This is exactly what `fill-adaptive-match-prefix' does except the latter
> uses `match-string-no-properties`.
>
> This seems to work fine for the color of the prefix but not for its font
> (when using variable-pitch-mode). So a second try was
>
>
> (setq adaptive-fill-function
> (lambda ()
> (and adaptive-fill-prefix
> (looking-at adaptive-fill-prefix)
> (propertize (match-string-no-properties 0) 'face 'default))))
>
> Now the wrap-prefix has the correct font but the wrong color (but this
> variant seems to work reasonably well for LaTeX and variable-pitch).
>
> I think, the wrap-prefix should at least have the default face (which
> may be modified by variable-pitch-mode) in any case. I'm not sure about
> the other properties like color, but may adaptive-wrap-mode should
> (optionally?) use something like the adaptive-fill-function above to
> assign the wrap-prefix the same face as the original prefix (in contrast
> to the one that happened to be active where the line got truncated).
>
> Though, I have no idea what to about the color vs. font problem (how to
> get both?).
How about using the face returned by face-at-point, instead of
'default'?
This bug report was last modified 11 years and 305 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.