mirror of
https://github.com/m00natic/vlfi.git
synced 2025-01-18 12:05:31 +00:00
Disable hexl-save-buffer and hexl revert when vlf-mode is active.
This commit is contained in:
parent
6bb60b72ad
commit
2c231dfb15
9
vlf.el
9
vlf.el
@ -138,7 +138,7 @@ values are: `write', `ediff', `occur', `search', `goto-line'."
|
||||
(defun vlf-keep-alive ()
|
||||
"Keep `vlf-mode' on major mode change."
|
||||
(if (eq major-mode 'hexl-mode)
|
||||
(remove-hook 'write-contents-functions 'hexl-save-buffer t))
|
||||
(set (make-local-variable 'revert-buffer-function) 'vlf-revert))
|
||||
(setq vlf-mode t))
|
||||
|
||||
;;;###autoload
|
||||
@ -222,6 +222,13 @@ When prefix argument is negative
|
||||
(add-hook 'vlf-before-chunk-update 'vlf-hexl-before)
|
||||
(add-hook 'vlf-after-chunk-update 'vlf-hexl-after)
|
||||
|
||||
(defadvice hexl-save-buffer (around vlf-hexl-save
|
||||
activate compile)
|
||||
"Prevent hexl save if `vlf-mode' is active."
|
||||
(if vlf-mode
|
||||
(vlf-write)
|
||||
ad-do-it))
|
||||
|
||||
(defadvice hexl-scroll-up (around vlf-hexl-scroll-up
|
||||
activate compile)
|
||||
"Slide to next batch if at end of buffer in `vlf-mode'."
|
||||
|
Loading…
x
Reference in New Issue
Block a user