]> code.delx.au - gnu-emacs/blobdiff - lisp/hexl.el
(Info-goto-index): One register one step in the history.
[gnu-emacs] / lisp / hexl.el
index ca08405cd107ff9db1df797bc20b25a9bc7258a5..6a4408e4d4ec9142179e934205dc12ac9352877f 100644 (file)
@@ -254,10 +254,8 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode.
     (setq require-final-newline nil)
 
     ;; Add hooks to rehexlify or dehexlify on various events.
-    (make-local-hook 'after-revert-hook)
     (add-hook 'after-revert-hook 'hexl-after-revert-hook nil t)
 
-    (make-local-hook 'change-major-mode-hook)
     (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t)
 
     (if hexl-follow-ascii (hexl-follow-ascii 1)))
@@ -703,7 +701,7 @@ and their encoded form is inserted byte by byte."
           (hexl-insert-char ch num))
          ((eq charset 'unknown)
           (error
-           "0x%x -- invalid character code; use \\[hexl-insert-hex-string]."
+           "0x%x -- invalid character code; use \\[hexl-insert-hex-string]"
            ch))
          (t
           (let ((encoded (encode-coding-char ch coding))
@@ -723,7 +721,7 @@ and their encoded form is inserted byte by byte."
                     ch internal-hex))
                   (setq encoded internal)
                 (error
-                 "Can't encode `0x%x' with this buffer's coding system; try \\[hexl-insert-hex-string]."
+                 "Can't encode `0x%x' with this buffer's coding system; try \\[hexl-insert-hex-string]"
                  ch)))
             (while (> num 0)
               (mapc
@@ -744,7 +742,7 @@ and their encoded form is inserted byte by byte."
 
 CH must be a unibyte character whose value is between 0 and 255."
   (if (or (< ch 0) (> ch 255))
-      (error "Invalid character 0x%x -- must be in the range [0..255]."))
+      (error "Invalid character 0x%x -- must be in the range [0..255]"))
   (let ((address (hexl-current-address t)))
     (while (> num 0)
       (let ((hex-position
@@ -835,8 +833,6 @@ Customize the variable `hexl-follow-ascii' to disable this feature."
                  (> (prefix-numeric-value arg) 0)
               (not hexl-ascii-overlay))))
 
-    (make-local-hook 'post-command-hook)
-                   
     (if on-p
       ;; turn it on
       (if (not hexl-ascii-overlay)
@@ -866,12 +862,12 @@ Customize the variable `hexl-follow-ascii' to disable this feature."
 
 (if hexl-mode-map
     nil
-  (setq hexl-mode-map (copy-keymap (current-global-map)))
+  (setq hexl-mode-map (make-keymap))
   ;; Make all self-inserting keys go through hexl-self-insert-command,
   ;; because we need to convert them to unibyte characters before
   ;; inserting them into the buffer.
   (substitute-key-definition 'self-insert-command 'hexl-self-insert-command
-                            hexl-mode-map)
+                            hexl-mode-map (current-global-map))
 
   (define-key hexl-mode-map [left] 'hexl-backward-char)
   (define-key hexl-mode-map [right] 'hexl-forward-char)