unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Frank Fischer <frank.fischer@mathematik.tu-chemnitz.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Frank Fischer <frank.fischer@mathematik.tu-chemnitz.de>,
	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:26:50 +0200	[thread overview]
Message-ID: <52162DBA.2040905@mathematik.tu-chemnitz.de> (raw)
In-Reply-To: <838uztkc80.fsf@gnu.org>

Am 08/22/2013 04:54 PM, schrieb Eli Zaretskii:
>> (setq adaptive-fill-function
>>   (lambda ()
>>     (and adaptive-fill-prefix
>>          (looking-at adaptive-fill-prefix)
>>          (propertize (match-string-no-properties 0) 'face 'default))))
> 
> How about using the face returned by face-at-point, instead of
> 'default'?

I'm not sure. In my tests (adding several % comment marker before a line
in a LaTeX document) I got strange results. Sometimes the wrap prefix
had the correct color, sometimes not. But in no case it had the correct
(variable-width) font. I used the following code (of course the correct
name of the variable is `adaptive-fill-regexp` not `adaptive-fill-prefix`):

(setq adaptive-fill-function
  (lambda ()
    (and adaptive-fill-regexp
         (looking-at adaptive-fill-regexp)
         (propertize (match-string-no-properties 0) 'face
		     (face-at-point)))))


But I suppose that using `match-string` instead of
`match-string-no-properties` should preserve the correct face, right?
But this did not work, too.






  reply	other threads:[~2013-08-22 15:26 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
2013-08-22 15:26       ` Frank Fischer [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=52162DBA.2040905@mathematik.tu-chemnitz.de \
    --to=frank.fischer@mathematik.tu-chemnitz.de \
    --cc=15155@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).