diff options
| author | Richard M. Stallman | 1995-03-09 03:05:51 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-03-09 03:05:51 +0000 |
| commit | c3de2bf0018ce0bb6e147dbbc010ae02869c64d5 (patch) | |
| tree | 1429f214577aab2e53d020f8e059ccf2ec990ff6 | |
| parent | b7e6e61235d74fca9b597e6ea8eac42265d429f5 (diff) | |
| download | emacs-c3de2bf0018ce0bb6e147dbbc010ae02869c64d5.tar.gz emacs-c3de2bf0018ce0bb6e147dbbc010ae02869c64d5.zip | |
(hexl-mode): Make after-revert-hook rehexlify.
(hexl-after-revert-hook): New function.
| -rw-r--r-- | lisp/hexl.el | 7 |
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 () |