summaryrefslogtreecommitdiff
path: root/lisp/hexl.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2002-03-04 01:13:52 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2002-03-04 01:13:52 +0000
commitb8c49a19feeb97b5d42cd19185e2dbbbd52ef92c (patch)
tree049918afa155024d30405319eb7fab92c6a4dfbb /lisp/hexl.el
parent0f38a885d5f669a6fc70ddb44aa797f64051ee80 (diff)
(hexlify-command, dehexlify-command): Remove.
(hexlify-buffer, dehexlify-buffer): Use call-process-region rather than shell-command-on-region.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r--lisp/hexl.el29
1 files changed, 8 insertions, 21 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el
index c8f1a79b185..176def81026 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -65,25 +65,8 @@ and \"-de\" when dehexlifying a buffer."
:group 'hexl)
(defcustom hexl-options (format "-hex %s" hexl-iso)
- "Options to `hexl-program' that suit your needs."
- :type 'string
- :group 'hexl)
-
-(defcustom hexlify-command
- (format "%s %s"
- (shell-quote-argument
- (expand-file-name hexl-program exec-directory))
- hexl-options)
- "The command to use to hexlify a buffer."
- :type 'string
- :group 'hexl)
-
-(defcustom dehexlify-command
- (format "%s -de %s"
- (shell-quote-argument
- (expand-file-name hexl-program exec-directory))
- hexl-options)
- "The command to use to unhexlify a buffer."
+ "Space separated options to `hexl-program' that suit your needs.
+Quoting cannot be used, so the arguments cannot themselves contain spaces."
:type 'string
:group 'hexl)
@@ -627,7 +610,9 @@ This discards the buffer's undo information."
(let ((coding-system-for-read 'raw-text)
(coding-system-for-write buffer-file-coding-system)
(buffer-undo-list t))
- (shell-command-on-region (point-min) (point-max) hexlify-command t)
+ (apply 'call-process-region (point-min) (point-max)
+ (expand-file-name hexl-program exec-directory)
+ t t nil (split-string hexl-options))
(if (> (point) (hexl-address-to-marker hexl-max-address))
(hexl-goto-address hexl-max-address))))
@@ -642,7 +627,9 @@ This discards the buffer's undo information."
(let ((coding-system-for-write 'raw-text)
(coding-system-for-read buffer-file-coding-system)
(buffer-undo-list t))
- (shell-command-on-region (point-min) (point-max) dehexlify-command t)))
+ (apply 'call-process-region (point-min) (point-max)
+ (expand-file-name hexl-program exec-directory)
+ t t nil "-de" (split-string hexl-options))))
(defun hexl-char-after-point ()
"Return char for ASCII hex digits at point."