Function: hexl-revert-buffer-function
hexl-revert-buffer-function is a byte-compiled function defined in
hexl.el.gz.
Signature
(hexl-revert-buffer-function IGNORE-AUTO NOCONFIRM)
Source Code
;; Defined in /usr/src/emacs/lisp/hexl.el.gz
(defun hexl-revert-buffer-function (_ignore-auto _noconfirm)
;; FIXME: We don't obey revert-buffer-preserve-modes!
(let ((coding-system-for-read 'no-conversion)
revert-buffer-function)
;; Call the original `revert-buffer' without code conversion; also
;; prevent it from changing the major mode to normal-mode, which
;; calls `set-auto-mode'.
(revert-buffer nil nil t)
;; A couple of hacks are necessary here:
;; 1. change the major-mode to one other than hexl-mode since the
;; function `hexl-mode' does nothing if the current major-mode is
;; already hexl-mode.
;; 2. reset change-major-mode-hook in case that `hexl-mode'
;; previously added hexl-maybe-dehexlify-buffer to it.
(remove-hook 'change-major-mode-hook #'hexl-maybe-dehexlify-buffer t)
(remove-hook 'eldoc-documentation-functions
#'hexl-print-current-point-info t)
(setq major-mode 'fundamental-mode)
(hexl-mode)))