Mercurial > hg > xemacs-beta
comparison lisp/packages/hexl.el @ 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:35 +0200 |
parents | 376386a54a3c |
children | bcdc7deadc19 |
comparison
equal
deleted
inserted
replaced
1:c0c6a60d29db | 2:ac2d302a0011 |
---|---|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
19 ;; General Public License for more details. | 19 ;; General Public License for more details. |
20 | 20 |
21 ;; You should have received a copy of the GNU General Public License | 21 ;; You should have received a copy of the GNU General Public License |
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free | 22 ;; along with XEmacs; see the file COPYING. If not, write to the Free |
23 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
24 | 24 ;; 02111-1307, USA. |
25 ;;; Synched up with: FSF 19.30. | 25 |
26 ;;; Synched up with: FSF 19.34. | |
26 | 27 |
27 ;;; Commentary: | 28 ;;; Commentary: |
28 | 29 |
29 ;; This package implements a major mode for editing binary files. It uses | 30 ;; This package implements a major mode for editing binary files. It uses |
30 ;; a program called hexl, supplied with the GNU Emacs distribution, that | 31 ;; a program called hexl, supplied with the GNU Emacs distribution, that |
53 ;; | 54 ;; |
54 ;; vars here | 55 ;; vars here |
55 ;; | 56 ;; |
56 | 57 |
57 (defvar hexl-program "hexl" | 58 (defvar hexl-program "hexl" |
58 "The program that will hexlify and de-hexlify its stdin. | 59 "The program that will hexlify and dehexlify its stdin. |
59 `hexl-program' will always be concatenated with `hexl-options' | 60 `hexl-program' will always be concatenated with `hexl-options' |
60 and \"-de\" when dehexlfying a buffer.") | 61 and \"-de\" when dehexlifying a buffer.") |
61 | 62 |
62 (defvar hexl-iso "" | 63 (defvar hexl-iso "" |
63 "If your emacs can handle ISO characters, this should be set to | 64 "If your emacs can handle ISO characters, this should be set to |
64 \"-iso\" otherwise it should be \"\".") | 65 \"-iso\" otherwise it should be \"\".") |
65 | 66 |
80 (defvar hexl-mode-map nil) | 81 (defvar hexl-mode-map nil) |
81 | 82 |
82 (defvar hexl-mode-old-local-map) | 83 (defvar hexl-mode-old-local-map) |
83 (defvar hexl-mode-old-mode-name) | 84 (defvar hexl-mode-old-mode-name) |
84 (defvar hexl-mode-old-major-mode) | 85 (defvar hexl-mode-old-major-mode) |
86 (defvar hexl-mode-old-write-contents-hooks) | |
87 (defvar hexl-mode-old-require-final-newline) | |
88 (defvar hexl-mode-old-syntax-table) | |
85 | 89 |
86 ;; routines | 90 ;; routines |
87 | |
88 (defvar hexl-mode-old-local-map) | |
89 (defvar hexl-mode-old-mode-name) | |
90 (defvar hexl-mode-old-major-mode) | |
91 | 91 |
92 ;;;###autoload | 92 ;;;###autoload |
93 (defun hexl-mode (&optional arg) | 93 (defun hexl-mode (&optional arg) |
94 "\\<hexl-mode-map> | 94 "\\<hexl-mode-map> |
95 A major mode for editing binary files in hex dump format. | 95 A major mode for editing binary files in hex dump format. |
161 You can use \\[hexl-find-file] to visit a file in hexl-mode. | 161 You can use \\[hexl-find-file] to visit a file in hexl-mode. |
162 | 162 |
163 \\[describe-bindings] for advanced commands." | 163 \\[describe-bindings] for advanced commands." |
164 (interactive "p") | 164 (interactive "p") |
165 (if (eq major-mode 'hexl-mode) | 165 (if (eq major-mode 'hexl-mode) |
166 (error "You are already in hexl mode.") | 166 (error "You are already in hexl mode") |
167 (kill-all-local-variables) | |
168 (make-local-variable 'hexl-mode-old-local-map) | |
169 (setq hexl-mode-old-local-map (current-local-map)) | |
170 (use-local-map hexl-mode-map) | |
171 | |
172 (make-local-variable 'hexl-mode-old-mode-name) | |
173 (setq hexl-mode-old-mode-name mode-name) | |
174 (setq mode-name "Hexl") | |
175 | |
176 (make-local-variable 'hexl-mode-old-major-mode) | |
177 (setq hexl-mode-old-major-mode major-mode) | |
178 (setq major-mode 'hexl-mode) | |
179 | |
180 (make-local-variable 'write-contents-hooks) | |
181 (add-hook 'write-contents-hooks 'hexl-save-buffer) | |
182 | |
183 (make-local-hook 'after-revert-hook) | |
184 (add-hook 'after-revert-hook 'hexl-after-revert-hook nil t) | |
185 | |
186 (make-local-variable 'hexl-max-address) | |
187 | |
188 (make-local-variable 'change-major-mode-hook) | |
189 (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer) | |
190 | |
191 (make-local-variable 'require-final-newline) | |
192 (setq require-final-newline nil) | |
193 | 167 |
194 (let ((modified (buffer-modified-p)) | 168 (let ((modified (buffer-modified-p)) |
195 (inhibit-read-only t) | 169 (inhibit-read-only t) |
196 (original-point (1- (point)))) | 170 (original-point (1- (point))) |
171 max-address) | |
197 (and (eobp) (not (bobp)) | 172 (and (eobp) (not (bobp)) |
198 (setq original-point (1- original-point))) | 173 (setq original-point (1- original-point))) |
199 (if (not (or (eq arg 1) (not arg))) | 174 (if (not (or (eq arg 1) (not arg))) |
200 ;; if no argument then we guess at hexl-max-address | 175 ;; if no argument then we guess at hexl-max-address |
201 (setq hexl-max-address (+ (* (/ (1- (buffer-size)) 68) 16) 15)) | 176 (setq max-address (+ (* (/ (1- (buffer-size)) 68) 16) 15)) |
202 (setq hexl-max-address (1- (buffer-size))) | 177 (setq max-address (1- (buffer-size))) |
203 (hexlify-buffer) | 178 (hexlify-buffer) |
204 (set-buffer-modified-p modified) | 179 (set-buffer-modified-p modified)) |
205 (hexl-goto-address original-point))))) | 180 (make-local-variable 'hexl-max-address) |
181 (setq hexl-max-address max-address) | |
182 (hexl-goto-address original-point)) | |
183 | |
184 ;; We do not turn off the old major mode; instead we just | |
185 ;; override most of it. That way, we can restore it perfectly. | |
186 (make-local-variable 'hexl-mode-old-local-map) | |
187 (setq hexl-mode-old-local-map (current-local-map)) | |
188 (use-local-map hexl-mode-map) | |
189 | |
190 (make-local-variable 'hexl-mode-old-mode-name) | |
191 (setq hexl-mode-old-mode-name mode-name) | |
192 (setq mode-name "Hexl") | |
193 | |
194 (make-local-variable 'hexl-mode-old-major-mode) | |
195 (setq hexl-mode-old-major-mode major-mode) | |
196 (setq major-mode 'hexl-mode) | |
197 | |
198 (make-local-variable 'hexl-mode-old-syntax-table) | |
199 (setq hexl-mode-old-syntax-table (syntax-table)) | |
200 (set-syntax-table (standard-syntax-table)) | |
201 | |
202 (make-local-variable 'hexl-mode-old-write-contents-hooks) | |
203 (setq hexl-mode-old-write-contents-hooks write-contents-hooks) | |
204 (make-local-variable 'write-contents-hooks) | |
205 (add-hook 'write-contents-hooks 'hexl-save-buffer) | |
206 | |
207 (make-local-variable 'hexl-mode-old-require-final-newline) | |
208 (setq hexl-mode-old-require-final-newline require-final-newline) | |
209 (make-local-variable 'require-final-newline) | |
210 (setq require-final-newline nil) | |
211 | |
212 ;; Add hooks to rehexlify or dehexlify on various events. | |
213 (make-local-hook 'after-revert-hook) | |
214 (add-hook 'after-revert-hook 'hexl-after-revert-hook nil t) | |
215 | |
216 (make-local-hook 'change-major-mode-hook) | |
217 (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t)) | |
218 (run-hooks 'hexl-mode-hook)) | |
206 | 219 |
207 (defun hexl-after-revert-hook () | 220 (defun hexl-after-revert-hook () |
208 (hexlify-buffer) | 221 (hexlify-buffer) |
209 (set-buffer-modified-p nil)) | 222 (set-buffer-modified-p nil)) |
210 | 223 |
261 (original-point (1+ (hexl-current-address)))) | 274 (original-point (1+ (hexl-current-address)))) |
262 (dehexlify-buffer) | 275 (dehexlify-buffer) |
263 (remove-hook 'write-contents-hooks 'hexl-save-buffer) | 276 (remove-hook 'write-contents-hooks 'hexl-save-buffer) |
264 (set-buffer-modified-p modified) | 277 (set-buffer-modified-p modified) |
265 (goto-char original-point))) | 278 (goto-char original-point))) |
279 | |
280 (remove-hook 'after-revert-hook 'hexl-after-revert-hook t) | |
281 (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t) | |
282 | |
283 (setq write-contents-hooks hexl-mode-old-write-contents-hooks) | |
284 (setq require-final-newline hexl-mode-old-require-final-newline) | |
266 (setq mode-name hexl-mode-old-mode-name) | 285 (setq mode-name hexl-mode-old-mode-name) |
267 (use-local-map hexl-mode-old-local-map) | 286 (use-local-map hexl-mode-old-local-map) |
287 (set-syntax-table hexl-mode-old-syntax-table) | |
268 (setq major-mode hexl-mode-old-major-mode) | 288 (setq major-mode hexl-mode-old-major-mode) |
269 (force-mode-line-update)) | 289 (force-mode-line-update)) |
270 | 290 |
271 (defun hexl-maybe-dehexlify-buffer () | 291 (defun hexl-maybe-dehexlify-buffer () |
272 "Convert a hexl format buffer to binary. | 292 "Convert a hexl format buffer to binary. |
300 "Return marker for ADDRESS." | 320 "Return marker for ADDRESS." |
301 (interactive "nAddress: ") | 321 (interactive "nAddress: ") |
302 (+ (* (/ address 16) 68) 11 (/ (* (% address 16) 5) 2))) | 322 (+ (* (/ address 16) 68) 11 (/ (* (% address 16) 5) 2))) |
303 | 323 |
304 (defun hexl-goto-address (address) | 324 (defun hexl-goto-address (address) |
305 "Goto hexl-mode (decimal) address ADDRESS. | 325 "Go to hexl-mode (decimal) address ADDRESS. |
306 Signal error if ADDRESS out of range." | 326 Signal error if ADDRESS out of range." |
307 (interactive "nAddress: ") | 327 (interactive "nAddress: ") |
308 (if (or (< address 0) (> address hexl-max-address)) | 328 (if (or (< address 0) (> address hexl-max-address)) |
309 (error "Out of hexl region.")) | 329 (error "Out of hexl region.")) |
310 (goto-char (hexl-address-to-marker address))) | 330 (goto-char (hexl-address-to-marker address))) |
500 (message "Out of hexl region.") | 520 (message "Out of hexl region.") |
501 (hexl-goto-address (+ address movement)) | 521 (hexl-goto-address (+ address movement)) |
502 (recenter 0)))) | 522 (recenter 0)))) |
503 | 523 |
504 (defun hexl-beginning-of-1k-page () | 524 (defun hexl-beginning-of-1k-page () |
505 "Goto to beginning of 1k boundry." | 525 "Go to beginning of 1k boundary." |
506 (interactive) | 526 (interactive) |
507 (hexl-goto-address (logand (hexl-current-address) -1024))) | 527 (hexl-goto-address (logand (hexl-current-address) -1024))) |
508 | 528 |
509 (defun hexl-end-of-1k-page () | 529 (defun hexl-end-of-1k-page () |
510 "Goto to end of 1k boundry." | 530 "Go to end of 1k boundary." |
511 (interactive) | 531 (interactive) |
512 (hexl-goto-address (let ((address (logior (hexl-current-address) 1023))) | 532 (hexl-goto-address (let ((address (logior (hexl-current-address) 1023))) |
513 (if (> address hexl-max-address) | 533 (if (> address hexl-max-address) |
514 (setq address hexl-max-address)) | 534 (setq address hexl-max-address)) |
515 address))) | 535 address))) |
516 | 536 |
517 (defun hexl-beginning-of-512b-page () | 537 (defun hexl-beginning-of-512b-page () |
518 "Goto to beginning of 512 byte boundry." | 538 "Go to beginning of 512 byte boundary." |
519 (interactive) | 539 (interactive) |
520 (hexl-goto-address (logand (hexl-current-address) -512))) | 540 (hexl-goto-address (logand (hexl-current-address) -512))) |
521 | 541 |
522 (defun hexl-end-of-512b-page () | 542 (defun hexl-end-of-512b-page () |
523 "Goto to end of 512 byte boundry." | 543 "Go to end of 512 byte boundary." |
524 (interactive) | 544 (interactive) |
525 (hexl-goto-address (let ((address (logior (hexl-current-address) 511))) | 545 (hexl-goto-address (let ((address (logior (hexl-current-address) 511))) |
526 (if (> address hexl-max-address) | 546 (if (> address hexl-max-address) |
527 (setq address hexl-max-address)) | 547 (setq address hexl-max-address)) |
528 address))) | 548 address))) |
534 (interactive "p") | 554 (interactive "p") |
535 (hexl-insert-char (read-quoted-char) arg)) | 555 (hexl-insert-char (read-quoted-char) arg)) |
536 | 556 |
537 ;00000000: 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789ABCDEF | 557 ;00000000: 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789ABCDEF |
538 | 558 |
559 ;;;###autoload | |
539 (defun hexlify-buffer () | 560 (defun hexlify-buffer () |
540 "Convert a binary buffer to hexl format." | 561 "Convert a binary buffer to hexl format. |
541 (interactive) | 562 This discards the buffer's undo information." |
563 (interactive) | |
564 (and buffer-undo-list | |
565 (or (y-or-n-p "Converting to hexl format discards undo info; ok? ") | |
566 (error "Aborted"))) | |
567 (setq buffer-undo-list nil) | |
542 (let ((binary-process-output nil) ; for Ms-Dos | 568 (let ((binary-process-output nil) ; for Ms-Dos |
543 (binary-process-input t)) | 569 (binary-process-input t) |
570 (buffer-undo-list t)) | |
544 (shell-command-on-region (point-min) (point-max) hexlify-command t))) | 571 (shell-command-on-region (point-min) (point-max) hexlify-command t))) |
545 | 572 |
546 (defun dehexlify-buffer () | 573 (defun dehexlify-buffer () |
547 "Convert a hexl format buffer to binary." | 574 "Convert a hexl format buffer to binary. |
548 (interactive) | 575 This discards the buffer's undo information." |
576 (interactive) | |
577 (and buffer-undo-list | |
578 (or (y-or-n-p "Converting from hexl format discards undo info; ok? ") | |
579 (error "Aborted"))) | |
580 (setq buffer-undo-list nil) | |
549 (let ((binary-process-output t) ; for Ms-Dos | 581 (let ((binary-process-output t) ; for Ms-Dos |
550 (binary-process-input nil)) | 582 (binary-process-input nil) |
583 (buffer-undo-list t)) | |
551 (shell-command-on-region (point-min) (point-max) dehexlify-command t))) | 584 (shell-command-on-region (point-min) (point-max) dehexlify-command t))) |
552 | 585 |
553 (defun hexl-char-after-point () | 586 (defun hexl-char-after-point () |
554 "Return char for ASCII hex digits at point." | 587 "Return char for ASCII hex digits at point." |
555 (hexl-htoi (char-after (point)) | 588 (hexl-htoi (char-after (point)) |
565 (if (and (>= character ?0) (<= character ?9)) | 598 (if (and (>= character ?0) (<= character ?9)) |
566 (- character ?0) | 599 (- character ?0) |
567 (let ((ch (logior character 32))) | 600 (let ((ch (logior character 32))) |
568 (if (and (>= ch ?a) (<= ch ?f)) | 601 (if (and (>= ch ?a) (<= ch ?f)) |
569 (- ch (- ?a 10)) | 602 (- ch (- ?a 10)) |
570 (error (format "Invalid hex digit `%c'." ch)))))) | 603 (error "Invalid hex digit `%c'." ch))))) |
571 | 604 |
572 (defun hexl-oct-char-to-integer (character) | 605 (defun hexl-oct-char-to-integer (character) |
573 "Take a char and return its value as if it was a octal digit." | 606 "Take a char and return its value as if it was a octal digit." |
574 (if (and (>= character ?0) (<= character ?7)) | 607 (if (and (>= character ?0) (<= character ?7)) |
575 (- character ?0) | 608 (- character ?0) |
576 (error (format "Invalid octal digit `%c'." character)))) | 609 (error "Invalid octal digit `%c'." character))) |
577 | 610 |
578 (defun hexl-printable-character (ch) | 611 (defun hexl-printable-character (ch) |
579 "Return a displayable string for character CH." | 612 "Return a displayable string for character CH." |
580 (format "%c" (if hexl-iso | 613 (format "%c" (if hexl-iso |
581 (if (or (< ch 32) (and (>= ch 127) (< ch 160))) | 614 (if (or (< ch 32) (and (>= ch 127) (< ch 160))) |
648 | 681 |
649 ;; startup stuff. | 682 ;; startup stuff. |
650 | 683 |
651 (if hexl-mode-map | 684 (if hexl-mode-map |
652 nil | 685 nil |
653 (setq hexl-mode-map (make-sparse-keymap)) | 686 (setq hexl-mode-map (make-sparse-keymap)) |
654 (set-keymap-name hexl-mode-map 'hexl-mode-map) | 687 |
655 | 688 (define-key hexl-mode-map [left] 'hexl-backward-char) |
656 (define-key hexl-mode-map 'left 'hexl-backward-char) | 689 (define-key hexl-mode-map [right] 'hexl-forward-char) |
657 (define-key hexl-mode-map 'right 'hexl-forward-char) | 690 (define-key hexl-mode-map [up] 'hexl-previous-line) |
658 (define-key hexl-mode-map 'up 'hexl-previous-line) | 691 (define-key hexl-mode-map [down] 'hexl-next-line) |
659 (define-key hexl-mode-map 'down 'hexl-next-line) | 692 (define-key hexl-mode-map [M-left] 'hexl-backward-short) |
660 (define-key hexl-mode-map '(meta left) 'hexl-backward-short) | 693 (define-key hexl-mode-map [M-right] 'hexl-forward-short) |
661 (define-key hexl-mode-map '(meta right) 'hexl-forward-short) | 694 (define-key hexl-mode-map [next] 'hexl-scroll-up) |
662 (define-key hexl-mode-map 'next 'hexl-scroll-up) | 695 (define-key hexl-mode-map [prior] 'hexl-scroll-down) |
663 (define-key hexl-mode-map 'prior 'hexl-scroll-down) | 696 (define-key hexl-mode-map [home] 'hexl-beginning-of-buffer) |
664 | 697 (define-key hexl-mode-map [deletechar] 'undefined) |
665 (define-key hexl-mode-map "\C-a" 'hexl-beginning-of-line) | 698 (define-key hexl-mode-map [deleteline] 'undefined) |
666 (define-key hexl-mode-map "\C-b" 'hexl-backward-char) | 699 (define-key hexl-mode-map [insertline] 'undefined) |
667 (define-key hexl-mode-map "\C-d" 'undefined) | 700 (define-key hexl-mode-map [S-delete] 'undefined) |
668 (define-key hexl-mode-map "\C-e" 'hexl-end-of-line) | 701 (define-key hexl-mode-map "\177" 'undefined) |
669 (define-key hexl-mode-map "\C-f" 'hexl-forward-char) | 702 |
670 | 703 (define-key hexl-mode-map "\C-a" 'hexl-beginning-of-line) |
671 (if (not (eq (key-binding (char-to-string help-char)) 'help-command)) | 704 (define-key hexl-mode-map "\C-b" 'hexl-backward-char) |
672 (define-key hexl-mode-map (char-to-string help-char) 'undefined)) | 705 (define-key hexl-mode-map "\C-d" 'undefined) |
673 | 706 (define-key hexl-mode-map "\C-e" 'hexl-end-of-line) |
674 (define-key hexl-mode-map "\C-i" 'hexl-self-insert-command) | 707 (define-key hexl-mode-map "\C-f" 'hexl-forward-char) |
675 (define-key hexl-mode-map "\C-j" 'hexl-self-insert-command) | 708 |
676 (define-key hexl-mode-map "\C-k" 'undefined) | 709 (if (not (eq (key-binding (char-to-string help-char)) 'help-command)) |
677 (define-key hexl-mode-map "\C-m" 'hexl-self-insert-command) | 710 (define-key hexl-mode-map (char-to-string help-char) 'undefined)) |
678 (define-key hexl-mode-map "\C-n" 'hexl-next-line) | 711 |
679 (define-key hexl-mode-map "\C-o" 'undefined) | 712 (define-key hexl-mode-map "\C-i" 'hexl-self-insert-command) |
680 (define-key hexl-mode-map "\C-p" 'hexl-previous-line) | 713 (define-key hexl-mode-map "\C-j" 'hexl-self-insert-command) |
681 (define-key hexl-mode-map "\C-q" 'hexl-quoted-insert) | 714 (define-key hexl-mode-map "\C-k" 'undefined) |
682 (define-key hexl-mode-map "\C-t" 'undefined) | 715 (define-key hexl-mode-map "\C-m" 'hexl-self-insert-command) |
683 (define-key hexl-mode-map "\C-v" 'hexl-scroll-up) | 716 (define-key hexl-mode-map "\C-n" 'hexl-next-line) |
684 (define-key hexl-mode-map "\C-w" 'undefined) | 717 (define-key hexl-mode-map "\C-o" 'undefined) |
685 (define-key hexl-mode-map "\C-y" 'undefined) | 718 (define-key hexl-mode-map "\C-p" 'hexl-previous-line) |
686 | 719 (define-key hexl-mode-map "\C-q" 'hexl-quoted-insert) |
687 (let ((ch 32)) | 720 (define-key hexl-mode-map "\C-t" 'undefined) |
688 (while (< ch 127) | 721 (define-key hexl-mode-map "\C-v" 'hexl-scroll-up) |
689 (define-key hexl-mode-map (char-to-string ch) 'hexl-self-insert-command) | 722 (define-key hexl-mode-map "\C-w" 'undefined) |
690 (setq ch (1+ ch)))) | 723 (define-key hexl-mode-map "\C-y" 'undefined) |
691 | 724 |
692 (define-key hexl-mode-map "\e\C-a" 'hexl-beginning-of-512b-page) | 725 (let ((ch 32)) |
693 (define-key hexl-mode-map "\e\C-b" 'hexl-backward-short) | 726 (while (< ch 127) |
694 (define-key hexl-mode-map "\e\C-c" 'undefined) | 727 (define-key hexl-mode-map (format "%c" ch) 'hexl-self-insert-command) |
695 (define-key hexl-mode-map "\e\C-d" 'hexl-insert-decimal-char) | 728 (setq ch (1+ ch)))) |
696 (define-key hexl-mode-map "\e\C-e" 'hexl-end-of-512b-page) | 729 |
697 (define-key hexl-mode-map "\e\C-f" 'hexl-forward-short) | 730 (define-key hexl-mode-map "\e\C-a" 'hexl-beginning-of-512b-page) |
698 (define-key hexl-mode-map "\e\C-g" 'undefined) | 731 (define-key hexl-mode-map "\e\C-b" 'hexl-backward-short) |
699 (define-key hexl-mode-map "\e\C-h" 'undefined) | 732 (define-key hexl-mode-map "\e\C-c" 'undefined) |
700 (define-key hexl-mode-map "\e\C-i" 'undefined) | 733 (define-key hexl-mode-map "\e\C-d" 'hexl-insert-decimal-char) |
701 (define-key hexl-mode-map "\e\C-j" 'undefined) | 734 (define-key hexl-mode-map "\e\C-e" 'hexl-end-of-512b-page) |
702 (define-key hexl-mode-map "\e\C-k" 'undefined) | 735 (define-key hexl-mode-map "\e\C-f" 'hexl-forward-short) |
703 (define-key hexl-mode-map "\e\C-l" 'undefined) | 736 (define-key hexl-mode-map "\e\C-g" 'undefined) |
704 (define-key hexl-mode-map "\e\C-m" 'undefined) | 737 (define-key hexl-mode-map "\e\C-h" 'undefined) |
705 (define-key hexl-mode-map "\e\C-n" 'undefined) | 738 (define-key hexl-mode-map "\e\C-i" 'undefined) |
706 (define-key hexl-mode-map "\e\C-o" 'hexl-insert-octal-char) | 739 (define-key hexl-mode-map "\e\C-j" 'undefined) |
707 (define-key hexl-mode-map "\e\C-p" 'undefined) | 740 (define-key hexl-mode-map "\e\C-k" 'undefined) |
708 (define-key hexl-mode-map "\e\C-q" 'undefined) | 741 (define-key hexl-mode-map "\e\C-l" 'undefined) |
709 (define-key hexl-mode-map "\e\C-r" 'undefined) | 742 (define-key hexl-mode-map "\e\C-m" 'undefined) |
710 (define-key hexl-mode-map "\e\C-s" 'undefined) | 743 (define-key hexl-mode-map "\e\C-n" 'undefined) |
711 (define-key hexl-mode-map "\e\C-t" 'undefined) | 744 (define-key hexl-mode-map "\e\C-o" 'hexl-insert-octal-char) |
712 (define-key hexl-mode-map "\e\C-u" 'undefined) | 745 (define-key hexl-mode-map "\e\C-p" 'undefined) |
713 | 746 (define-key hexl-mode-map "\e\C-q" 'undefined) |
714 (define-key hexl-mode-map "\e\C-w" 'undefined) | 747 (define-key hexl-mode-map "\e\C-r" 'undefined) |
715 (define-key hexl-mode-map "\e\C-x" 'hexl-insert-hex-char) | 748 (define-key hexl-mode-map "\e\C-s" 'undefined) |
716 (define-key hexl-mode-map "\e\C-y" 'undefined) | 749 (define-key hexl-mode-map "\e\C-t" 'undefined) |
717 | 750 (define-key hexl-mode-map "\e\C-u" 'undefined) |
718 (define-key hexl-mode-map "\ea" 'undefined) ;hexl-beginning-of-1k-page | 751 |
719 (define-key hexl-mode-map "\eb" 'hexl-backward-word) | 752 (define-key hexl-mode-map "\e\C-w" 'undefined) |
720 (define-key hexl-mode-map "\ec" 'undefined) | 753 (define-key hexl-mode-map "\e\C-x" 'hexl-insert-hex-char) |
721 (define-key hexl-mode-map "\ed" 'undefined) | 754 (define-key hexl-mode-map "\e\C-y" 'undefined) |
722 (define-key hexl-mode-map "\ee" 'undefined) ;hexl-end-of-1k-page | 755 |
723 (define-key hexl-mode-map "\ef" 'hexl-forward-word) | 756 (define-key hexl-mode-map "\ea" 'undefined) |
724 (define-key hexl-mode-map "\eg" 'hexl-goto-hex-address) | 757 (define-key hexl-mode-map "\eb" 'hexl-backward-word) |
725 (define-key hexl-mode-map "\eh" 'undefined) | 758 (define-key hexl-mode-map "\ec" 'undefined) |
726 (define-key hexl-mode-map "\ei" 'undefined) | 759 (define-key hexl-mode-map "\ed" 'undefined) |
727 (define-key hexl-mode-map "\ej" 'hexl-goto-address) | 760 (define-key hexl-mode-map "\ee" 'undefined) |
728 (define-key hexl-mode-map "\ek" 'undefined) | 761 (define-key hexl-mode-map "\ef" 'hexl-forward-word) |
729 (define-key hexl-mode-map "\el" 'undefined) | 762 (define-key hexl-mode-map "\eg" 'hexl-goto-hex-address) |
730 (define-key hexl-mode-map "\em" 'undefined) | 763 (define-key hexl-mode-map "\eh" 'undefined) |
731 (define-key hexl-mode-map "\en" 'undefined) | 764 (define-key hexl-mode-map "\ei" 'undefined) |
732 (define-key hexl-mode-map "\eo" 'undefined) | 765 (define-key hexl-mode-map "\ej" 'hexl-goto-address) |
733 (define-key hexl-mode-map "\ep" 'undefined) | 766 (define-key hexl-mode-map "\ek" 'undefined) |
734 (define-key hexl-mode-map "\eq" 'undefined) | 767 (define-key hexl-mode-map "\el" 'undefined) |
735 (define-key hexl-mode-map "\er" 'undefined) | 768 (define-key hexl-mode-map "\em" 'undefined) |
736 (define-key hexl-mode-map "\es" 'undefined) | 769 (define-key hexl-mode-map "\en" 'undefined) |
737 (define-key hexl-mode-map "\et" 'undefined) | 770 (define-key hexl-mode-map "\eo" 'undefined) |
738 (define-key hexl-mode-map "\eu" 'undefined) | 771 (define-key hexl-mode-map "\ep" 'undefined) |
739 (define-key hexl-mode-map "\ev" 'hexl-scroll-down) | 772 (define-key hexl-mode-map "\eq" 'undefined) |
740 (define-key hexl-mode-map "\ey" 'undefined) | 773 (define-key hexl-mode-map "\er" 'undefined) |
741 (define-key hexl-mode-map "\ez" 'undefined) | 774 (define-key hexl-mode-map "\es" 'undefined) |
742 (define-key hexl-mode-map "\e<" 'hexl-beginning-of-buffer) | 775 (define-key hexl-mode-map "\et" 'undefined) |
743 (define-key hexl-mode-map "\e>" 'hexl-end-of-buffer) | 776 (define-key hexl-mode-map "\eu" 'undefined) |
744 | 777 (define-key hexl-mode-map "\ev" 'hexl-scroll-down) |
745 (define-key hexl-mode-map "\C-c\C-c" 'hexl-mode-exit) | 778 (define-key hexl-mode-map "\ey" 'undefined) |
746 | 779 (define-key hexl-mode-map "\ez" 'undefined) |
747 (define-key hexl-mode-map "\C-x[" 'hexl-beginning-of-1k-page) | 780 (define-key hexl-mode-map "\e<" 'hexl-beginning-of-buffer) |
748 (define-key hexl-mode-map "\C-x]" 'hexl-end-of-1k-page) | 781 (define-key hexl-mode-map "\e>" 'hexl-end-of-buffer) |
749 (define-key hexl-mode-map "\C-x\C-p" 'undefined) | 782 |
750 (define-key hexl-mode-map "\C-x\C-s" 'hexl-save-buffer) | 783 (define-key hexl-mode-map "\C-c\C-c" 'hexl-mode-exit) |
751 (define-key hexl-mode-map "\C-x\C-t" 'undefined)) | 784 |
785 (define-key hexl-mode-map "\C-x[" 'hexl-beginning-of-1k-page) | |
786 (define-key hexl-mode-map "\C-x]" 'hexl-end-of-1k-page) | |
787 (define-key hexl-mode-map "\C-x\C-p" 'undefined) | |
788 (define-key hexl-mode-map "\C-x\C-s" 'hexl-save-buffer) | |
789 (define-key hexl-mode-map "\C-x\C-t" 'undefined)) | |
752 | 790 |
753 ;;; hexl.el ends here | 791 ;;; hexl.el ends here |