[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
remove-overlays test [was: * lisp/hi-lock.el: More fixes for revert-buff
From: |
Juri Linkov |
Subject: |
remove-overlays test [was: * lisp/hi-lock.el: More fixes for revert-buffer (bug#57534)] |
Date: |
Fri, 28 Jun 2024 09:43:30 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) |
> just to mention this is causing a regression on my testbench:
Thanks for the heads-up. The problem is that in 'remove-overlays'
values are compared with 'eq', and there is no way to specify
another test function.
This important detail is still missing in (info "(elisp) Managing Overlays")
(this could be added now), whereas the docstring was updated recently via
bug#13648.
This example demonstrates the problem:
(with-temp-buffer
(insert "str")
(let ((prop "a")
(ov (make-overlay (point-min) (point-max))))
(overlay-put ov 'prop prop)
(remove-overlays nil nil 'prop prop)
(overlays-in (point-min) (point-max))))
=> nil
(with-temp-buffer
(insert "str")
(let ((ov (make-overlay (point-min) (point-max))))
(overlay-put ov 'prop "a")
(remove-overlays nil nil 'prop "a")
(overlays-in (point-min) (point-max))))
=> (#<overlay in no buffer>)
So this is fixed now by using the same string for 'eq'.