1
0
mirror of https://github.com/m00natic/vlfi.git synced 2025-02-24 05:48:06 +00:00

Move save interception to vlfi-mode.

This commit is contained in:
Andrey Kotlarski 2013-04-11 16:53:38 +03:00
parent 467154ad06
commit c4f87f9ec7

View File

@ -73,6 +73,7 @@
(setq buffer-read-only t) (setq buffer-read-only t)
(set-buffer-modified-p nil) (set-buffer-modified-p nil)
(buffer-disable-undo) (buffer-disable-undo)
(add-hook 'write-contents-functions 'vlfi-write)
(make-local-variable 'vlfi-batch-size) (make-local-variable 'vlfi-batch-size)
(put 'vlfi-batch-size 'permanent-local t) (put 'vlfi-batch-size 'permanent-local t)
(make-local-variable 'vlfi-start-pos) (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." "Major mode for editing large file chunks."
(setq buffer-read-only nil) (setq buffer-read-only nil)
(buffer-enable-undo) (buffer-enable-undo)
(add-hook 'write-contents-functions 'vlfi-write)
(message (substitute-command-keys (message (substitute-command-keys
"Editing: Type \\[vlfi-write] to write chunk \ "Editing: Type \\[vlfi-write] to write chunk \
or \\[vlfi-discard-edit] to discard changes."))) or \\[vlfi-discard-edit] to discard changes.")))