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

Unmark the temporary buffer for preview as modified #375

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knu
Copy link

@knu knu commented Feb 19, 2021

This fixes two annoying problems.

  • When set-auto-mode is called with a buffer marked as modified, some minor modes that conditionally call revert-buffer result in generating a user prompt while navigating through helm candidates.

    editorconfig-mode is one of such modes. editorconfig-apply is called via change-major-mode-after-body-hook and tries to enforce the coding system specified by the project via revert-buffer-with-coding-system, which generates a yes-or-no-p prompt asking "Revert buffer from file ?".

  • Persistent undo history for the file is affected and broken when using packages like undohist and undo-fu-session.

This fixes two annoying problems.

- When `set-auto-mode` is called with a buffer marked as modified,
  some minor modes that conditionally call `revert-buffer` result in
  generating a user prompt while navigating through helm candidates.

  `editorconfig-mode` is one of such modes.  `editorconfig-apply` is
  called via `change-major-mode-after-body-hook` and tries to enforce
  the coding system specified by the project via
  `revert-buffer-with-coding-system`, which generates a yes-or-no-p
  prompt asking "Revert buffer from file <filename>?".

- Persistent undo history for the file is affected and broken when
  using packages like `undohist` and `undo-fu-session`.
Copy link
Contributor

@syohex syohex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@knu
Copy link
Author

knu commented Mar 18, 2021

Is there anyone who can merge this? /ping @jcs090218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants