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

Add custom revert function.

This commit is contained in:
Andrey Kotlarski 2013-04-11 22:57:49 +03:00
parent 7985f0f453
commit e115e7e56a

View File

@ -75,6 +75,7 @@
(set-buffer-modified-p nil)
(buffer-disable-undo)
(add-hook 'write-contents-functions 'vlfi-write)
(setq revert-buffer-function 'vlfi-revert)
(make-local-variable 'vlfi-batch-size)
(put 'vlfi-batch-size 'permanent-local t)
(make-local-variable 'vlfi-start-pos)
@ -242,6 +243,11 @@ buffer. You can customize number of bytes displayed by customizing
(vlfi-mode)
(switch-to-buffer (current-buffer))))
(defun vlfi-revert (&rest args)
"Revert current chunk. Ignore ARGS."
(ignore args)
(vlfi-move-to-chunk vlfi-start-pos vlfi-end-pos))
;;;###autoload
(defun dired-vlfi (from-end)
"In Dired, visit the file on this line in VLFI mode.