M-x revert-buffer resets the active minor modes to the defaults for the underlying file. How can I preserve the minor modes active while reverting the buffer?
My attempt so far:
(defun revert () (interactive) (let ((active-modes minor-mode-list)) (revert-buffer t t) (setq minor-mode-list active-modes)))
This seemed broadly reasonable. Save minor-mode-list, revert the buffer, setq to restore. Calling (revert) seems to be exactly equivalent to calling revert-buffer and I'm not sure how to debug this.
What am I missing?