From c4f87f9ec768fb40129cd48323071f87c7921d31 Mon Sep 17 00:00:00 2001 From: Andrey Kotlarski Date: Thu, 11 Apr 2013 16:53:38 +0300 Subject: [PATCH] Move save interception to vlfi-mode. --- vlfi.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlfi.el b/vlfi.el index d6da88b..e859fd4 100644 --- a/vlfi.el +++ b/vlfi.el @@ -73,6 +73,7 @@ (setq buffer-read-only t) (set-buffer-modified-p nil) (buffer-disable-undo) + (add-hook 'write-contents-functions 'vlfi-write) (make-local-variable 'vlfi-batch-size) (put 'vlfi-batch-size 'permanent-local t) (make-local-variable 'vlfi-start-pos) @@ -395,7 +396,6 @@ Search is performed chunk by chunk in `vlfi-batch-size' memory." "Major mode for editing large file chunks." (setq buffer-read-only nil) (buffer-enable-undo) - (add-hook 'write-contents-functions 'vlfi-write) (message (substitute-command-keys "Editing: Type \\[vlfi-write] to write chunk \ or \\[vlfi-discard-edit] to discard changes.")))