mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-15 04:11:53 -08:00
(hexl-mode): Make after-revert-hook rehexlify.
(hexl-after-revert-hook): New function.
This commit is contained in:
parent
b7e6e61235
commit
c3de2bf001
1 changed files with 7 additions and 0 deletions
|
|
@ -170,6 +170,9 @@ You can use \\[hexl-find-file] to visit a file in hexl-mode.
|
|||
(make-local-variable 'write-contents-hooks)
|
||||
(add-hook 'write-contents-hooks 'hexl-save-buffer)
|
||||
|
||||
(make-local-hook 'after-revert-hook)
|
||||
(add-hook 'after-revert-hook 'hexl-after-revert-hook nil t)
|
||||
|
||||
(make-local-variable 'hexl-max-address)
|
||||
|
||||
(make-local-variable 'change-major-mode-hook)
|
||||
|
|
@ -186,6 +189,10 @@ You can use \\[hexl-find-file] to visit a file in hexl-mode.
|
|||
(set-buffer-modified-p modified)
|
||||
(hexl-goto-address original-point)))))
|
||||
|
||||
(defun hexl-after-revert-hook ()
|
||||
(hexlify-buffer)
|
||||
(set-buffer-modified-p nil))
|
||||
|
||||
(defvar hexl-in-save-buffer nil)
|
||||
|
||||
(defun hexl-save-buffer ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue