GNU bug report logs -
#39680
27.0.60; electric-pair-mode broken by undo
Previous Next
Full log
Message #14 received at 39680 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> Stefan, what is your view on this attempted patch? Is it sound?
>
> I think we need something like the patch below (not really tested yet).
> WDYT?
FWIW, I applied it and AFAICT I can't reproduce the issue.
>>> Thank you for your time.
>> Thank you for a good bug report, conveniently reduced to a minimum test
>> case.
>
> Indeed. This is pretty delicate code, so a concise and easy to reproduce
> test case is very welcome.
Happy to help. Though I wonder why my attempted ERT test only fails
half the time. Reproduced here for context:
(ert-deftest electric-pair-undo-unrelated-state ()
(with-temp-buffer
(buffer-enable-undo)
(electric-pair-mode)
(let ((last-command-event ?\())
(self-insert-command 1))
(undo-boundary)
(insert "hi there")
(undo)
(let ((last-command-event ?\())
(self-insert-command 1))))
With your patch, C-x C-e'ing the inner with-temp-buffer form once
triggers no error (an "Undo" shows up in *Messages*); C-x C-e'ing a
second time without moving point causes a "No further undo information"
user error.
At any rate, thanks for the fix!
This bug report was last modified 5 years and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.