Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs in evil-with-undo' and evil-undo-pop' with undo-tree. #1429

Closed
wants to merge 1 commit into from

Conversation

tsc25
Copy link
Contributor

@tsc25 tsc25 commented Mar 6, 2021

Addresses #1074

  • evil-with-undo:
    nconc'ing onto front of buffer-undo-list here can corrupt buffer-undo-list
    when in undo-tree-mode in rare circumstances (see issue Remove undo-tree dependency #1074 referenced
    above). Since evil-temporary-undo was always nil when executing @Body
    anyway, and reset to nil at end, other elisp code could never see a non-nil
    value for it anyway here. So we fix the nconc bug by simplifying the code,
    and getting rid of the redundant evil-temporary-undo juggling in the
    process.

  • evil-undo-pop:
    This function called `undo' directly from Elisp, which is almost always a bug
    in undo-tree-mode. Fix this by calling undo-tree-undo instead when in
    undo-tree-mode.

Addresses emacs-evil#1074

- evil-with-undo:
  nconc'ing onto front of buffer-undo-list here can corrupt buffer-undo-list
  when in undo-tree-mode in rare circumstances (see issue emacs-evil#1074 referenced
  above). Since evil-temporary-undo was always nil when executing @Body
  anyway, and reset to nil at end, other elisp code could never see a non-nil
  value for it anyway here. So we fix the nconc bug by simplifying the code,
  and getting rid of the redundant evil-temporary-undo juggling in the
  process.

- evil-undo-pop:
  This function called `undo' directly from Elisp, which is almost always a bug
  in undo-tree-mode. Fix this by calling undo-tree-undo instead when in
  undo-tree-mode.
@tsc25 tsc25 closed this Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant