# HG changeset patch # User Stefan Monnier # Date 1168532552 0 # Node ID f109c3c000009a28b6723d7f7bd99293d5d1ea1c # Parent c456d15d23fd9ea2360fa46816497b4db6c39e88 (hexlify-buffer, dehexlify-buffer): Don't complain and don't activate undo when undo is not active. Reported by Chris . diff -r c456d15d23fd -r f109c3c00000 lisp/ChangeLog --- a/lisp/ChangeLog Wed Jan 10 23:48:04 2007 +0000 +++ b/lisp/ChangeLog Thu Jan 11 16:22:32 2007 +0000 @@ -1,3 +1,9 @@ +2007-01-11 Stefan Monnier + + * hexl.el (hexlify-buffer, dehexlify-buffer): Don't complain and don't + activate undo when undo is not active. + Reported by Chris . + 2007-01-10 Stefan Monnier * ffap.el (ffap-next-regexp, ffap-machine-p, ffap-newsgroup-regexp) diff -r c456d15d23fd -r f109c3c00000 lisp/hexl.el --- a/lisp/hexl.el Wed Jan 10 23:48:04 2007 +0000 +++ b/lisp/hexl.el Thu Jan 11 16:22:32 2007 +0000 @@ -1,7 +1,7 @@ ;;; hexl.el --- edit a file in a hex dump format using the hexl filter ;; Copyright (C) 1989, 1994, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006 Free Software Foundation, Inc. +;; 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: Keith Gabryelski ;; Maintainer: FSF @@ -706,10 +706,10 @@ "Convert a binary buffer to hexl format. This discards the buffer's undo information." (interactive) - (and buffer-undo-list + (and (consp buffer-undo-list) (or (y-or-n-p "Converting to hexl format discards undo info; ok? ") - (error "Aborted"))) - (setq buffer-undo-list nil) + (error "Aborted")) + (setq buffer-undo-list nil)) ;; Don't decode text in the ASCII part of `hexl' program output. (let ((coding-system-for-read 'raw-text) (coding-system-for-write buffer-file-coding-system) @@ -731,10 +731,10 @@ "Convert a hexl format buffer to binary. This discards the buffer's undo information." (interactive) - (and buffer-undo-list + (and (consp buffer-undo-list) (or (y-or-n-p "Converting from hexl format discards undo info; ok? ") - (error "Aborted"))) - (setq buffer-undo-list nil) + (error "Aborted")) + (setq buffer-undo-list nil)) (let ((coding-system-for-write 'raw-text) (coding-system-for-read buffer-file-coding-system) (buffer-undo-list t))