summaryrefslogtreecommitdiff
path: root/lisp/hexl.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2010-01-14 15:37:13 +0100
committerJuanma Barranquero <lekktu@gmail.com>2010-01-14 15:37:13 +0100
commit9c23ca4755058be7808f5e5b7704309356b8e168 (patch)
tree3ca48cc3cd1bc1450f61b68b6076998a43c5ce84 /lisp/hexl.el
parent8794c483aefa2e99318b259f63055d6f45ba0b4d (diff)
downloademacs-9c23ca4755058be7808f5e5b7704309356b8e168.tar.gz
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.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r--lisp/hexl.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 2854ca12d45..7edf5ec10ac 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -779,11 +779,11 @@ This discards the buffer's undo information."
(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))))