*** hexl.el.~1.115.~ Sat Oct 27 12:07:12 2007 --- hexl.el Mon Jan 21 14:32:58 2008 *************** *** 136,141 **** --- 136,143 ---- (put 'hexl-mode 'mode-class 'special) + (defvar hexl-revert nil) + ;;;###autoload (defun hexl-mode (&optional arg) "\\A mode for editing binary files in hex dump format. *************** *** 211,217 **** \\[describe-bindings] for advanced commands." (interactive "p") ! (unless (eq major-mode 'hexl-mode) (let ((modified (buffer-modified-p)) (inhibit-read-only t) (original-point (- (point) (point-min)))) --- 213,219 ---- \\[describe-bindings] for advanced commands." (interactive "p") ! (unless (and (eq major-mode 'hexl-mode) (not hexl-revert)) (let ((modified (buffer-modified-p)) (inhibit-read-only t) (original-point (- (point) (point-min)))) *************** *** 322,328 **** (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t)) (defun hexl-after-revert-hook () ! (hexl-mode)) (defvar hexl-in-save-buffer nil) --- 324,331 ---- (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t)) (defun hexl-after-revert-hook () ! (let ((hexl-revert t)) ! (hexl-mode))) (defvar hexl-in-save-buffer nil)