all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Frank Fischer <frank.fischer@mathematik.tu-chemnitz.de>
Cc: 15155@debbugs.gnu.org
Subject: bug#15155: 24.3; wrap-prefix in adaptive-wrap-prefix-mode with variable-pitch has	wrong face
Date: Thu, 22 Aug 2013 17:54:23 +0300	[thread overview]
Message-ID: <838uztkc80.fsf@gnu.org> (raw)
In-Reply-To: <5215B7EC.10808@mathematik.tu-chemnitz.de>

> Date: Thu, 22 Aug 2013 09:04:12 +0200
> From: Frank Fischer <frank.fischer@mathematik.tu-chemnitz.de>
> Cc: 15155@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'?





  reply	other threads:[~2013-08-22 14:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21 19:54 bug#15155: 24.3; wrap-prefix in adaptive-wrap-prefix-mode with variable-pitch has wrong face Frank Fischer
2013-08-22  1:33 ` Stefan Monnier
2013-08-22  7:04   ` Frank Fischer
2013-08-22 14:54     ` Eli Zaretskii [this message]
2013-08-22 15:26       ` Frank Fischer
2013-08-22 16:03         ` Eli Zaretskii
2013-08-22 16:15           ` Frank Fischer
2013-08-22 16:56             ` Eli Zaretskii
2013-08-22 20:32               ` Frank Fischer
2013-08-23  6:41                 ` Eli Zaretskii
2013-08-23 13:17                   ` Frank Fischer
2013-08-23 14:29                     ` Eli Zaretskii
2013-08-23 15:17                       ` Frank Fischer
2013-08-23 15:38                     ` Stefan Monnier
2013-08-24  9:58                       ` Frank Fischer
2013-08-26  4:14                         ` Stefan Monnier
2013-08-23 15:39                     ` Stefan Monnier
2013-08-22 18:15       ` Stefan Monnier
2013-08-22 18:49         ` Eli Zaretskii
2013-08-22 14:50   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838uztkc80.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=15155@debbugs.gnu.org \
    --cc=frank.fischer@mathematik.tu-chemnitz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.