[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41810: Tweaking adaptive-wrap

From: Kévin Le Gouguec
Subject: bug#41810: Tweaking adaptive-wrap
Date: Fri, 14 Aug 2020 23:15:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hello Emacs,

adaptive-wrap is a GNU ELPA package that adds a wrap-prefix property to
continuation lines to make them look like they have been filled with
M-q.  For example, it makes this…

    ; Here is a long Elisp comment
    with its continuation line.

… look like this:

    ; Here is a long Elisp comment
    ; with its continuation line.

The second "; " is not part of the buffer text: it is the wrap-prefix
computed by adaptive-wrap.  This prefix can be customized with the
integer variable adaptive-wrap-extra-indent, which adds (if positive) or
takes off (if negative) some extra padding.

In bug#41810, I tried to tackle the following issues:

1. The extra-indent character is not fontified:

2. The prefix has no background, which makes lines with :extend'ed
   backgrounds visually jarring:

I proposed (and Stefan and Basil kindly reviewed) two patches:

1. One to fix those two bugs:

Attachment: patch1.patch
Description: Text Data


2. One to only ever use spaces for positive extra-indentation:

Attachment: patch2.patch
Description: Text Data


Lars squashed those two patches and applied them to elpa.git.  Before
bumping the version number (and therefore releasing a new version), it'd
be great if people could either

1. review the patches some more: e.g. does the logic in
   adaptive-wrap--prefix-face sound OK, or is it completely bonkers?

2. try the changes and tell us if something broke horribly; if you don't
   have elpa.git cloned, you can get the latest adaptive-wrap.el here:


   Then run emacs -L /path/to/adaptive-wrap-dir.

Thanks in advance for your help.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]