changeset 106835:a3b4c6fc276c

Fix bug#5313: editing files in hexl-mode corrupts file * hexl.el (hexl-printable-character): Fix check of `hexl-iso', which is always a string.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 14 Jan 2010 15:37:13 +0100
parents 7d6d38782123
children 964aafa9629a c5a37faa1902
files lisp/ChangeLog lisp/hexl.el
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jan 14 14:16:40 2010 +0100
+++ b/lisp/ChangeLog	Thu Jan 14 15:37:13 2010 +0100
@@ -1,3 +1,8 @@
+2010-01-14  Juanma Barranquero  <lekktu@gmail.com>
+
+	* hexl.el (hexl-printable-character): Fix check of `hexl-iso',
+	which is always a string.  (Bug#5313)
+
 2010-01-14  Juanma Barranquero  <lekktu@gmail.com>
 
 	* progmodes/ada-xref.el (ada-default-prj-properties):
--- a/lisp/hexl.el	Thu Jan 14 14:16:40 2010 +0100
+++ b/lisp/hexl.el	Thu Jan 14 15:37:13 2010 +0100
@@ -779,11 +779,11 @@
 
 (defun hexl-printable-character (ch)
   "Return a displayable string for character CH."
-  (format "%c" (if hexl-iso
-		   (if (or (< ch 32) (and (>= ch 127) (< ch 160)))
+  (format "%c" (if (equal hexl-iso "")
+		   (if (or (< ch 32) (>= ch 127))
 		       46
 		     ch)
-		 (if (or (< ch 32) (>= ch 127))
+		 (if (or (< ch 32) (and (>= ch 127) (< ch 160)))
 		     46
 		   ch))))