changeset 10948:2e151c5d8485

(hexl-mode): Make after-revert-hook rehexlify. (hexl-after-revert-hook): New function.
author Richard M. Stallman <rms@gnu.org>
date Thu, 09 Mar 1995 03:05:51 +0000
parents e805ef6b931c
children 99c9f475a355
files lisp/hexl.el
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 ()