summaryrefslogtreecommitdiff
path: root/lisp/hexl.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2000-10-11 17:08:28 +0000
committerEli Zaretskii <eliz@gnu.org>2000-10-11 17:08:28 +0000
commit0716afa2de0cf37d46174fb5f0657d53af9b7471 (patch)
tree739d4f58cb74d50738fdc38b88ac8d47e5253a61 /lisp/hexl.el
parent5c8b7eaf159b50bd07ded0a4ca153fd78d53867c (diff)
downloademacs-0716afa2de0cf37d46174fb5f0657d53af9b7471.tar.gz
(hexlify-buffer): Bind coding-system-for-write to
buffer-file-coding-system, instead of raw-text. (dehexlify-buffer): Bind coding-system-for-read to buffer-file-coding-system, instead of raw-text.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r--lisp/hexl.el22
1 files changed, 2 insertions, 20 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el
index aca123a0ade..293226a15d2 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -600,17 +600,7 @@ This discards the buffer's undo information."
(setq buffer-undo-list nil)
;; Don't decode text in the ASCII part of `hexl' program output.
(let ((coding-system-for-read 'raw-text)
- ;; If the buffer was read with EOL conversions, be sure to use the
- ;; same conversions when passing the region to the `hexl' program.
- (coding-system-for-write
- (let ((eol-type (coding-system-eol-type buffer-file-coding-system)))
- (cond ((eq eol-type 1)
- 'raw-text-dos)
- ((eq eol-type 2)
- 'raw-text-mac)
- ((eq eol-type 0)
- 'raw-text-unix)
- (t 'no-conversion))))
+ (coding-system-for-write buffer-file-coding-system)
(buffer-undo-list t))
(shell-command-on-region (point-min) (point-max) hexlify-command t)
(if (> (point) (hexl-address-to-marker hexl-max-address))
@@ -625,15 +615,7 @@ This discards the buffer's undo information."
(error "Aborted")))
(setq buffer-undo-list nil)
(let ((coding-system-for-write 'raw-text)
- (coding-system-for-read
- (let ((eol-type (coding-system-eol-type buffer-file-coding-system)))
- (cond ((eq eol-type 1)
- 'raw-text-dos)
- ((eq eol-type 2)
- 'raw-text-mac)
- ((eq eol-type 0)
- 'raw-text-unix)
- (t 'no-conversion))))
+ (coding-system-for-read buffer-file-coding-system)
(buffer-undo-list t))
(shell-command-on-region (point-min) (point-max) dehexlify-command t)))