From febe2a2ba267be60f0ec38e2ec368782cd5d671f Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 21 Nov 2005 01:10:54 +0000 Subject: [PATCH] (backspace): New map. (init-hex): Use cond and expressions. --- unicode.mim | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/unicode.mim b/unicode.mim index 6f4d5a0..552518e 100644 --- a/unicode.mim +++ b/unicode.mim @@ -38,7 +38,10 @@ ("0" "0") ("1" "1") ("2" "2") ("3" "3") ("4" "4") ("5" "5") ("6" "6") ("7" "7") ("8" "8") ("9" "9") ("A" "A") ("B" "B") ("C" "C") ("D" "D") ("E" "E") ("F" "F") - ("a" "A") ("b" "B") ("c" "C") ("d" "D") ("e" "E") ("f" "F"))) + ("a" "A") ("b" "B") ("c" "C") ("d" "D") ("e" "E") ("f" "F")) + + (backspace + ((BackSpace)))) (state (init @@ -46,13 +49,13 @@ (uni-hex (hex (set this @-) - (< this ?A - ((sub this 48)) - ((sub this 55))) - (mul code 16) (add code this) - (add count 1) - (= count 4 - ((delete @<) (insert code) (shift init)))))) + (cond ((< @- ?A) (sub this 48)) + (1 (sub this 55))) + (set code (+ (* code 16) this)) + (set count (+ count 1)) + (cond ((= count 4) + (delete @<) (insert code) (shift init)))) + (backspace (undo)))) ;; Local Variables: ;; mode: lisp -- 1.7.10.4