]> git.eshelyaron.com Git - emacs.git/commitdiff
(hexl-mode): Make after-revert-hook rehexlify.
authorRichard M. Stallman <rms@gnu.org>
Thu, 9 Mar 1995 03:05:51 +0000 (03:05 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 9 Mar 1995 03:05:51 +0000 (03:05 +0000)
(hexl-after-revert-hook): New function.

lisp/hexl.el

index 669724506b0ed82559a094accee0c41b2e4f77b4..806312b0bba43bc145db958f9d7ac5c7be259135 100644 (file)
@@ -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 ()