# HG changeset patch # User Richard M. Stallman # Date 794718351 0 # Node ID 2e151c5d84854bb13790861f54690cbc2de0fd6c # Parent e805ef6b931c234a5096dc235bff9b3d268f3068 (hexl-mode): Make after-revert-hook rehexlify. (hexl-after-revert-hook): New function. diff -r e805ef6b931c -r 2e151c5d8485 lisp/hexl.el --- a/lisp/hexl.el Thu Mar 09 02:58:36 1995 +0000 +++ b/lisp/hexl.el Thu Mar 09 03:05:51 1995 +0000 @@ -170,6 +170,9 @@ (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 @@ (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 ()