diff options
| author | Richard M. Stallman | 1994-05-07 21:55:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-07 21:55:56 +0000 |
| commit | 1fa65e2ff9dfd4c1dc9b30fe4d157b330396c096 (patch) | |
| tree | 2e4fa4e198440f73ef4d544b60ecc19b6187edb6 | |
| parent | 093650fe31b91e7698032a1ccdecfb4d57b5ea6c (diff) | |
| download | emacs-1fa65e2ff9dfd4c1dc9b30fe4d157b330396c096.tar.gz emacs-1fa65e2ff9dfd4c1dc9b30fe4d157b330396c096.zip | |
(dehexlify-buffer): Reflect that binary-process was
renamed to binary-process-output.
(dehexlify-buffer): Bind also binary-process-input (for ms-dos).
(hexlify-buffer): Bind both binary-process-input and
binary-process-input (for ms-dos).
(hexl-save-buffer): Force binary save (for ms-dos).
| -rw-r--r-- | lisp/hexl.el | 10 |
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 () |