Function: hexl-mode-exit

hexl-mode-exit is an interactive and byte-compiled function defined in hexl.el.gz.

Signature

(hexl-mode-exit &optional ARG)

Documentation

Exit Hexl mode, returning to previous mode.

With arg, don't unhexlify buffer.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/hexl.el.gz
(defun hexl-mode-exit (&optional arg)
  "Exit Hexl mode, returning to previous mode.
With arg, don't unhexlify buffer."
  (interactive "p")
  (if (or (eq arg 1) (not arg))
      (let ((modified (buffer-modified-p))
	    (inhibit-read-only t)
            (point-offset (hexl-current-address)))
	(dehexlify-buffer)
	(remove-hook 'write-contents-functions #'hexl-save-buffer t)
	(restore-buffer-modified-p modified)
	(goto-char (filepos-to-bufferpos point-offset 'exact))))

  (remove-hook 'change-major-mode-hook #'hexl-maybe-dehexlify-buffer t)
  (major-mode-restore))