diff options
author | Richard Hansen <rhansen@rhansen.org> | 2022-12-13 01:33:43 -0500 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-12-21 16:02:30 +0200 |
commit | d76d7a3bebf1ff0b06a38f7f96d316752844ed10 (patch) | |
tree | a58b2418407d023fdad97f7c14e806f5b1416bdb /lisp/gnus | |
parent | 12b2b8864c295ce27594e8a907ebb3423e58a9d4 (diff) | |
download | emacs-d76d7a3bebf1ff0b06a38f7f96d316752844ed10.tar.gz emacs-d76d7a3bebf1ff0b06a38f7f96d316752844ed10.tar.bz2 emacs-d76d7a3bebf1ff0b06a38f7f96d316752844ed10.zip |
whitespace: Avoid mutating original buffer's markers in clones
* lisp/whitespace.el (whitespace--clone): New hook function that is
run after cloning a buffer that copies `whitespace-bob-marker' and
`whitespace-eob-marker' and changes the copies to point to the new
buffer (Bug#59618).
(whitespace-color-on): Register the hook function.
(whitespace-color-off): Unregister the hook function.
* test/lisp/whitespace-tests.el
(whitespace-tests--with-test-buffer): New macro.
(whitespace-tests--check-markers): New function.
(whitespace-tests--indirect-clone-breaks-base-markers)
(whitespace-tests--indirect-clone-markers)
(whitespace-tests--regular-clone-markers): New tests.
Diffstat (limited to 'lisp/gnus')
0 files changed, 0 insertions, 0 deletions