# HG changeset patch # User Stefan Monnier # Date 1015204432 0 # Node ID 72f0c48d5c611c15ef9798a2f61f5755ebec81e6 # Parent 5e6a5df9973a40334aedfd9fd96b22668628248b (hexlify-command, dehexlify-command): Remove. (hexlify-buffer, dehexlify-buffer): Use call-process-region rather than shell-command-on-region. diff -r 5e6a5df9973a -r 72f0c48d5c61 lisp/hexl.el --- a/lisp/hexl.el Mon Mar 04 01:10:55 2002 +0000 +++ b/lisp/hexl.el Mon Mar 04 01:13:52 2002 +0000 @@ -65,25 +65,8 @@ :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 @@ (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 @@ (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."