diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-04-03 17:22:11 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-04-03 17:22:11 +0000 |
commit | 68022b4c94ee395de273f247b185dd2680c8003e (patch) | |
tree | 8453d6cbb6993176c8fe534727460b8c01f185c7 /lisp/hexl.el | |
parent | 63ef2723e194acd88d1b2c07a392bc99ac862592 (diff) | |
download | emacs-68022b4c94ee395de273f247b185dd2680c8003e.tar.gz |
(hexlify-buffer, dehexlify-buffer): Clear out the undo
info, and don't record undo info for the conversion.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r-- | lisp/hexl.el | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el index 9cf768248c3..d804d5b514f 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -554,17 +554,29 @@ You may also type up to 3 octal digits, to insert a character with that code" ;;;###autoload (defun hexlify-buffer () - "Convert a binary buffer to hexl format." + "Convert a binary buffer to hexl format. +This discards the buffer's undo information." (interactive) + (and buffer-undo-list + (or (y-or-n-p "Converting to hexl format discards undo info; ok? ") + (error "Aborted"))) + (setq buffer-undo-list nil) (let ((binary-process-output nil) ; for Ms-Dos - (binary-process-input t)) + (binary-process-input t) + (buffer-undo-list t)) (shell-command-on-region (point-min) (point-max) hexlify-command t))) (defun dehexlify-buffer () - "Convert a hexl format buffer to binary." + "Convert a hexl format buffer to binary. +This discards the buffer's undo information." (interactive) + (and buffer-undo-list + (or (y-or-n-p "Converting from hexl format discards undo info; ok? ") + (error "Aborted"))) + (setq buffer-undo-list nil) (let ((binary-process-output t) ; for Ms-Dos - (binary-process-input nil)) + (binary-process-input nil) + (buffer-undo-list t)) (shell-command-on-region (point-min) (point-max) dehexlify-command t))) (defun hexl-char-after-point () |