# HG changeset patch # User Richard M. Stallman # Date 828552131 0 # Node ID 382c7659273effabd4ed316b6e53d73f2d8b6079 # Parent 0722324b64ee8f9601c919c591dedd61a8b32aa5 (hexlify-buffer, dehexlify-buffer): Clear out the undo info, and don't record undo info for the conversion. diff -r 0722324b64ee -r 382c7659273e lisp/hexl.el --- a/lisp/hexl.el Wed Apr 03 06:15:04 1996 +0000 +++ b/lisp/hexl.el Wed Apr 03 17:22:11 1996 +0000 @@ -554,17 +554,29 @@ ;;;###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 ()