mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 20:10:47 +00:00
Use permanent buffer local write hook and update README.
This commit is contained in:
parent
a63ea7a5d0
commit
fd9c258fc8
@ -49,10 +49,8 @@ example you can directly press digits to enter prefix arguments.
|
|||||||
|
|
||||||
** Changing major mode
|
** Changing major mode
|
||||||
|
|
||||||
You can temporarily change major mode to whatever you like. Just
|
You can temporarily change major mode to whatever you like. Saving
|
||||||
*don't save*! Turn to *vlfi-edit-mode* first (may need to mark buffer
|
will insert contents as intended. You can return to *vlfi-mode* too.
|
||||||
as modified if needed). And you can return to *vlfi-mode* too if you
|
|
||||||
haven't changed anything.
|
|
||||||
|
|
||||||
* Detail usage
|
* Detail usage
|
||||||
|
|
||||||
|
3
vlfi.el
3
vlfi.el
@ -76,7 +76,8 @@
|
|||||||
(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 'write-file-functions)
|
||||||
|
(add-hook 'write-file-functions 'vlfi-write)
|
||||||
(make-local-variable 'revert-buffer-function)
|
(make-local-variable 'revert-buffer-function)
|
||||||
(setq revert-buffer-function 'vlfi-revert)
|
(setq revert-buffer-function 'vlfi-revert)
|
||||||
(make-local-variable 'vlfi-batch-size)
|
(make-local-variable 'vlfi-batch-size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user