To disable savehist-mode
, which is a global minor-mode, one can use: (savehist-mode -1)
When disabling savehist-mode
, the function savehist-uninstall
is called ... savehist-minibuffer-hook
is removed from the minibuffer-setup-hook
, and savehist-autosave
is removed from the kill-emacs-hook
, and the timer savehist-timer
is canceled.
However, savehist-mode
is not enabled in Emacs 26 by default. Therefore, the better approach would be to find out where in the user-configuration of the original poster savehist-mode
is being enabled and remove that line of code or comment it out. The easiest method would be to use grep
and search for the term savehist-mode
.
savehist-mode
has been around for ages and it is highly unlikely it is responsible for making Emacs freeze frequently. Turning it off for purposes of troubleshooting, however, may be a worthwhile endeavor.
The best approach is to try and get a backtrace when Emacs freezes. If pressing C-g
does not suffice, then consider building Emacs from source and launching Emacs under gdb
... with the terminal starting directory being the src
directory so that the .gdbinit
gets loaded. Then, when Emacs freezes, you can force a backtrace ... which is beyond the scope of this answer.