aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/hexl.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el
index d7e7cd44baa..130a2573a14 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -202,7 +202,8 @@ You can use \\[hexl-find-file] to visit a file in hexl-mode.
202 (set-buffer name) 202 (set-buffer name)
203 (dehexlify-buffer) 203 (dehexlify-buffer)
204 ;; Prevent infinite recursion. 204 ;; Prevent infinite recursion.
205 (let ((hexl-in-save-buffer t)) 205 (let ((hexl-in-save-buffer t)
206 (buffer-file-type t)) ; for ms-dos
206 (save-buffer)) 207 (save-buffer))
207 (setq modified (buffer-modified-p)) 208 (setq modified (buffer-modified-p))
208 (delete-region (point-min) (point-max)) 209 (delete-region (point-min) (point-max))
@@ -499,12 +500,15 @@ You may also type up to 3 octal digits, to insert a character with that code"
499(defun hexlify-buffer () 500(defun hexlify-buffer ()
500 "Convert a binary buffer to hexl format" 501 "Convert a binary buffer to hexl format"
501 (interactive) 502 (interactive)
502 (shell-command-on-region (point-min) (point-max) hexlify-command t)) 503 (let ((binary-process-output nil) ; for Ms-Dos
504 (binary-process-input t))
505 (shell-command-on-region (point-min) (point-max) hexlify-command t)))
503 506
504(defun dehexlify-buffer () 507(defun dehexlify-buffer ()
505 "Convert a hexl format buffer to binary." 508 "Convert a hexl format buffer to binary."
506 (interactive) 509 (interactive)
507 (let ((binary-process t)) ; for Ms-Dos 510 (let ((binary-process-output t) ; for Ms-Dos
511 (binary-process-input nil))
508 (shell-command-on-region (point-min) (point-max) dehexlify-command t))) 512 (shell-command-on-region (point-min) (point-max) dehexlify-command t)))
509 513
510(defun hexl-char-after-point () 514(defun hexl-char-after-point ()