;;; Code:
(require 'eldoc)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
;;
;; vars here
(const 16)
(const 32)
(const 64))
- :group 'hexl)
+ :group 'hexl
+ :version "24.3")
(defcustom hexl-program "hexl"
"The program that will hexlify and dehexlify its stdin.
(2 'hexl-ascii-region t t)))
"Font lock keywords used in `hexl-mode'.")
-(defun hexl-rulerise (string bits)
+(defun hexl-rulerize (string bits)
(let ((size (/ bits 4)) (strlen (length string)) (pos 0) (ruler ""))
(while (< pos strlen)
(setq ruler (concat ruler " " (substring string pos (+ pos size))))
(lambda (bits)
(cons bits
(concat " 87654321 "
- (hexl-rulerise "00112233445566778899aabbccddeeff" bits)
+ (hexl-rulerize "00112233445566778899aabbccddeeff" bits)
" 0123456789abcdef")))
'(8 16 32 64)))
;; routines
" \\(?: .+\n[a-f0-9]+: \\)?"))
textre))
bound noerror count))
- (let ((isearch-search-fun-function nil))
- (isearch-search-fun))))
+ (isearch-search-fun-default)))
(defvar hexl-in-save-buffer nil)
(let ((completion-ignored-extensions nil))
(read-file-name "Filename: " nil nil 'ret-must-match))))
;; Ignore the user's setting of default major-mode.
- (letf (((default-value 'major-mode) 'fundamental-mode))
+ (cl-letf (((default-value 'major-mode) 'fundamental-mode))
(find-file-literally filename))
(if (not (eq major-mode 'hexl-mode))
(hexl-mode)))
(error "Invalid character 0x%x -- must be in the range [0..255]" ch))
(let ((address (hexl-current-address t)))
(while (> num 0)
- (let ((hex-position
- (+ (* (/ address 16) (hexl-line-displen))
- 10 (point-min)
- (* 2 (% address 16))
- (/ (% address 16) 2)))
+ (let ((hex-position (hexl-address-to-marker address))
(ascii-position
(+ (* (/ address 16) (hexl-line-displen))
(hexl-ascii-start-column)