aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/hexl.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 669724506b0..806312b0bba 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -170,6 +170,9 @@ You can use \\[hexl-find-file] to visit a file in hexl-mode.
170 (make-local-variable 'write-contents-hooks) 170 (make-local-variable 'write-contents-hooks)
171 (add-hook 'write-contents-hooks 'hexl-save-buffer) 171 (add-hook 'write-contents-hooks 'hexl-save-buffer)
172 172
173 (make-local-hook 'after-revert-hook)
174 (add-hook 'after-revert-hook 'hexl-after-revert-hook nil t)
175
173 (make-local-variable 'hexl-max-address) 176 (make-local-variable 'hexl-max-address)
174 177
175 (make-local-variable 'change-major-mode-hook) 178 (make-local-variable 'change-major-mode-hook)
@@ -186,6 +189,10 @@ You can use \\[hexl-find-file] to visit a file in hexl-mode.
186 (set-buffer-modified-p modified) 189 (set-buffer-modified-p modified)
187 (hexl-goto-address original-point))))) 190 (hexl-goto-address original-point)))))
188 191
192(defun hexl-after-revert-hook ()
193 (hexlify-buffer)
194 (set-buffer-modified-p nil))
195
189(defvar hexl-in-save-buffer nil) 196(defvar hexl-in-save-buffer nil)
190 197
191(defun hexl-save-buffer () 198(defun hexl-save-buffer ()