*** autorevert.el Thu Jan 10 19:25:18 2008 --- autorevert.el Tue Jan 22 14:24:16 2008 *************** *** 412,417 **** --- 412,419 ---- (not (memq major-mode global-auto-revert-ignore-modes))))) + (defvar auto-revert-tail-is-revert-buffer nil) + (defun auto-revert-handler () "Revert current buffer, if appropriate. This is an internal function used by Auto-Revert Mode." *************** *** 448,454 **** (= (window-point window) (point-max)) (push window eoblist))) 'no-mini t)) ! (if auto-revert-tail-mode (auto-revert-tail-handler size) ;; Bind buffer-read-only in case user has done C-x C-q, ;; so as not to forget that. This gives undesirable results --- 450,457 ---- (= (window-point window) (point-max)) (push window eoblist))) 'no-mini t)) ! (if (and auto-revert-tail-mode ! (not auto-revert-tail-is-revert-buffer)) (auto-revert-tail-handler size) ;; Bind buffer-read-only in case user has done C-x C-q, ;; so as not to forget that. This gives undesirable results *** hexl.el Thu Jan 10 19:25:24 2008 --- hexl.el Tue Jan 22 14:27:52 2008 *************** *** 136,141 **** --- 136,144 ---- (put 'hexl-mode 'mode-class 'special) + (defvar auto-revert-tail-is-revert-buffer) + (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)))) --- 214,220 ---- \\[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)))) *************** *** 249,254 **** --- 252,259 ---- (setq hexl-mode-old-mode-name mode-name) (setq mode-name "Hexl") + (set (make-local-variable 'auto-revert-tail-is-revert-buffer) t) + (set (make-local-variable 'hexl-mode-old-isearch-search-fun-function) isearch-search-fun-function) (set (make-local-variable 'isearch-search-fun-function) *************** *** 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) --- 327,334 ---- (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) *************** *** 388,393 **** --- 394,401 ---- (or (bobp) (setq original-point (1+ original-point)))) (goto-char original-point))) + (setq auto-revert-tail-is-revert-buffer nil) + (remove-hook 'before-revert-hook 'hexl-before-revert-hook t) (remove-hook 'after-revert-hook 'hexl-after-revert-hook t) (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t)