1
0
mirror of https://github.com/m00natic/vlfi.git synced 2025-01-18 12:05:31 +00:00

Use permanent buffer local write hook and update README.

This commit is contained in:
Andrey Kotlarski 2013-04-17 14:46:50 +03:00
parent a63ea7a5d0
commit fd9c258fc8
2 changed files with 4 additions and 5 deletions

View File

@ -49,10 +49,8 @@ example you can directly press digits to enter prefix arguments.
** Changing major mode
You can temporarily change major mode to whatever you like. Just
*don't save*! Turn to *vlfi-edit-mode* first (may need to mark buffer
as modified if needed). And you can return to *vlfi-mode* too if you
haven't changed anything.
You can temporarily change major mode to whatever you like. Saving
will insert contents as intended. You can return to *vlfi-mode* too.
* Detail usage

View File

@ -76,7 +76,8 @@
(setq buffer-read-only t)
(set-buffer-modified-p nil)
(buffer-disable-undo)
(add-hook 'write-contents-functions 'vlfi-write)
(make-local-variable 'write-file-functions)
(add-hook 'write-file-functions 'vlfi-write)
(make-local-variable 'revert-buffer-function)
(setq revert-buffer-function 'vlfi-revert)
(make-local-variable 'vlfi-batch-size)