summaryrefslogtreecommitdiff
path: root/lisp/hexl.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-01-06 04:35:56 +0000
committerRichard M. Stallman <rms@gnu.org>1994-01-06 04:35:56 +0000
commit1fd57b82ad0ce6a0a70715459fe6176f1d7218a4 (patch)
tree3f93dc927b87e3991479ea46ba0bb61a7fde6756 /lisp/hexl.el
parentf07f2b421cf13dfa76f877c6f4dd26aa07c31f9b (diff)
downloademacs-1fd57b82ad0ce6a0a70715459fe6176f1d7218a4.tar.gz
(dehexlify-buffer): If msdos, bind binary-process.
(hexl-find-file): Load as binary.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r--lisp/hexl.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el
index aaac455a489..37b17cb7658 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -219,7 +219,9 @@ You can use \\[hexl-find-file] to visit a file in hexl-mode.
"Edit file FILENAME in hexl-mode.
Switch to a buffer visiting file FILENAME, creating one in none exists."
(interactive "fFilename: ")
- (find-file filename)
+ (if (eq system-type 'ms-dos)
+ (find-file-binary filename)
+ (find-file filename))
(if (not (eq major-mode 'hexl-mode))
(hexl-mode)))
@@ -504,7 +506,8 @@ You may also type up to 3 octal digits, to insert a character with that code"
(defun dehexlify-buffer ()
"Convert a hexl format buffer to binary."
(interactive)
- (shell-command-on-region (point-min) (point-max) dehexlify-command t))
+ (let ((binary-process t)) ; for Ms-Dos
+ (shell-command-on-region (point-min) (point-max) dehexlify-command t)))
(defun hexl-char-after-point ()
"Return char for ASCII hex digits at point."