;;; Commentary:
+;; This package implements a major mode for editing binary files. It uses
+;; a program called hexl, supplied with the GNU Emacs distribution, that
+;; can filter a binary into an editable format or from the format back into
+;; binary. For full instructions, invoke `hexl-mode' on an empty buffer and
+;; do `M-x describe-mode'.
+;;
;; This may be useful in your .emacs:
;;
;; (autoload 'hexl-find-file "hexl"
;;;###autoload
(defun hexl-mode (&optional arg)
"\\<hexl-mode-map>
-A major mode for editting binary files in hex dump format.
+A major mode for editing binary files in hex dump format.
This function automatically converts a buffer into the hexl format
using the function `hexlify-buffer'.
"Move vertically down ARG lines [16 bytes] (up if ARG negative) in hexl-mode.
If there is no byte at the target address move to the last byte in that line."
(interactive "p")
- (hexl-goto-address (let ((address (+ (hexl-current-address) (* arg 16)) t))
+ (hexl-goto-address (let ((address (+ (hexl-current-address) (* arg 16))))
(if (and (< arg 0) (< address 0))
(progn (message "Out of hexl region.")
(setq address
(define-key hexl-mode-map "\C-e" 'hexl-end-of-line)
(define-key hexl-mode-map "\C-f" 'hexl-forward-char)
- (if (not (eq (key-binding help-char) 'help-command))
+ (if (not (eq (key-binding (char-to-string help-char)) 'help-command))
(define-key hexl-mode-map help-char 'undefined))
(define-key hexl-mode-map "\C-i" 'hexl-self-insert-command)