From: Frank Fischer <frank.fischer@mathematik.tu-chemnitz.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 15155@debbugs.gnu.org
Subject: bug#15155: 24.3; wrap-prefix in adaptive-wrap-prefix-mode with variable-pitch has wrong face
Date: Fri, 23 Aug 2013 17:17:59 +0200 [thread overview]
Message-ID: <20130823171759.575f8991@mawo> (raw)
In-Reply-To: <83fvu0iipa.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
Am Fri, 23 Aug 2013 17:29:37 +0300
schrieb Eli Zaretskii <eliz@gnu.org>:
> > That patch seems to work, thank you.
>
> Thanks, committed as trunk revision 113979.
Cool!
> I think your analysis is correct. Perhaps invoking font-lock to
> fontify the appropriate portion of the text, before taking the prefix
> string, will solve that?
>
> > Perhaps this is a more an issue of adaptive-wrap-mode, I
> > don't know.
>
> I think it is indeed an issue with adaptive-wrap-mode.
Yes, it seems to work. I used the attached patch for adaptive-wrap.el
(although I do not know if this is the correct way to do because
I'm not really familiar with font-lock), it just works for me.
Thanks again
Frank
[-- Attachment #2: adaptive-wrap.patch --]
[-- Type: text/x-patch, Size: 1290 bytes --]
--- adaptive-wrap-old.el 2013-08-23 17:02:00.150840918 +0200
+++ adaptive-wrap.el 2013-08-23 17:06:33.411490626 +0200
@@ -83,12 +83,20 @@
(defun adaptive-wrap-prefix-function (beg end)
"Indent the region between BEG and END with adaptive filling."
(goto-char beg)
- (while (< (point) end)
- (let ((lbp (line-beginning-position)))
- (put-text-property (point)
- (progn (search-forward "\n" end 'move) (point))
- 'wrap-prefix
- (adaptive-wrap-fill-context-prefix lbp (point))))))
+ (and font-lock-fontify-region-function
+ (funcall font-lock-fontify-region-function beg end))
+ (let ((adaptive-fill-function
+ (or adaptive-fill-function
+ (and adaptive-fill-regexp
+ (lambda ()
+ (and (looking-at adaptive-fill-regexp)
+ (match-string 0)))))))
+ (while (< (point) end)
+ (let ((lbp (line-beginning-position)))
+ (put-text-property (point)
+ (progn (search-forward "\n" end 'move) (point))
+ 'wrap-prefix
+ (adaptive-wrap-fill-context-prefix lbp (point)))))))
;;;###autoload
(define-minor-mode adaptive-wrap-prefix-mode
next prev parent reply other threads:[~2013-08-23 15:17 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
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 [this message]
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=20130823171759.575f8991@mawo \
--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).