bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#60333: [PATCH] whitespace: Update bob, eob markers in base and indir


From: Richard Hansen
Subject: bug#60333: [PATCH] whitespace: Update bob, eob markers in base and indirect buffers
Date: Mon, 26 Dec 2022 01:21:18 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

Attached patch:

    whitespace: Update bob, eob markers in base and indirect buffers

    When a buffer is changed, update `whitespace-bob-marker' and
    `whitespace-eob-marker' not just in the current buffer, but
    also in the base buffer and all of its indirect buffers (if
    any) (Bug#46982).
    * lisp/whitespace.el (whitespace--indirect-buffers,
    whitespace--refresh-indirect-buffers,
    whitespace-unload-function): Track the relationships between
    base buffers and their indirect buffers.
    (whitespace--update-bob-eob-all, whitespace-color-on,
    whitespace-color-off): Define a new function that calls
    `whitespace--update-bob-eob' on the base buffer and all of its
    indirect buffers, and use this new function instead of
    `whitespace--update-bob-eob' in `after-change-functions'.

See Bug#46982 for additional context. This can also be thought of as a continuation of the fix for Bug#59618 made in commit d76d7a3bebf1ff0b06a38f7f96d316752844ed10.

I'm not sure if this patch belongs on master, on emacs-29, or nowhere:
* The bug it fixes is very minor, so it might not be worth the added complexity. * It touches code that has been the source of a few recent bugs, so I'm wary of introducing new bugs onto emacs-29. * This is a workaround for Bug#46982; it would be better to fix that bug instead (although fixing that bug might be infeasible for reasons of backwards compatibility).

Attachment: 0001-whitespace-Update-bob-eob-markers-in-base-and-indire.patch
Description: Text Data

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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