> - it's probably better to bind inhibit-read-only than buffer-read-only. > - IIRC buffer-undo-list doesn't need to be bound here since > insert-file-contents does it for us anyway. In the attached patch I followed your suggestions and also simplified the `revert-without-query' mechanism slightly. By the way, shouldn't (set (make-local-variable 'revert-buffer-internal-hook) local-hook) be handled by add-hook?