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 callrevert-buffer
result in generating a user prompt while navigating through helm candidates.editorconfig-mode
is one of such modes.editorconfig-apply
is called viachange-major-mode-after-body-hook
and tries to enforce the coding system specified by the project viarevert-buffer-with-coding-system
, which generates a yes-or-no-p prompt asking "Revert buffer from filePersistent undo history for the file is affected and broken when using packages like
undohist
andundo-fu-session
.