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:
parent
7985f0f453
commit
e115e7e56a
6
vlfi.el
6
vlfi.el
@ -75,6 +75,7 @@
|
|||||||
(set-buffer-modified-p nil)
|
(set-buffer-modified-p nil)
|
||||||
(buffer-disable-undo)
|
(buffer-disable-undo)
|
||||||
(add-hook 'write-contents-functions 'vlfi-write)
|
(add-hook 'write-contents-functions 'vlfi-write)
|
||||||
|
(setq revert-buffer-function 'vlfi-revert)
|
||||||
(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)
|
||||||
@ -242,6 +243,11 @@ buffer. You can customize number of bytes displayed by customizing
|
|||||||
(vlfi-mode)
|
(vlfi-mode)
|
||||||
(switch-to-buffer (current-buffer))))
|
(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
|
;;;###autoload
|
||||||
(defun dired-vlfi (from-end)
|
(defun dired-vlfi (from-end)
|
||||||
"In Dired, visit the file on this line in VLFI mode.
|
"In Dired, visit the file on this line in VLFI mode.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user