[Linedit-cvs] CVS update: src/linedit.asd src/terminal-translations.lisp src/version.lisp-expr

Nikodemus Siivola nsiivola at common-lisp.net
Fri Mar 5 09:21:46 UTC 2004


Update of /project/linedit/cvsroot/src
In directory common-lisp.net:/tmp/cvs-serv31145

Modified Files:
	linedit.asd terminal-translations.lisp version.lisp-expr 
Log Message:
Version 0.15.6: fixes Home and End on latin keyboards.
Date: Fri Mar  5 04:21:46 2004
Author: nsiivola

Index: src/linedit.asd
diff -u src/linedit.asd:1.23 src/linedit.asd:1.24
--- src/linedit.asd:1.23	Mon Mar  1 08:28:37 2004
+++ src/linedit.asd	Fri Mar  5 04:21:45 2004
@@ -48,7 +48,7 @@
     (error 'operation-error :component c :operation o)))
 
 (defsystem :linedit
-    :version "0.15.4"
+    :version "0.15.6"
     :depends-on (:uffi :terminfo)
     :components
   (;; Common


Index: src/terminal-translations.lisp
diff -u src/terminal-translations.lisp:1.3 src/terminal-translations.lisp:1.4
--- src/terminal-translations.lisp:1.3	Mon Oct 20 14:20:53 2003
+++ src/terminal-translations.lisp	Fri Mar  5 04:21:46 2004
@@ -23,11 +23,11 @@
 
 (defvar *terminal-translations* (make-hash-table :test #'equalp))
 
-(defmacro deftrans (name chord &optional alt)
-  `(progn 
-     (setf (gethash ,chord *terminal-translations*) ,name)
-     (when ,alt
-       (setf (gethash ,alt *terminal-translations*) ,name))))
+(defmacro deftrans (name &rest chords)
+  `(dolist (chord ',chords)
+     (when (gethash chord *terminal-translations*)
+       (warn "Multiple translations for ~A." chord))
+     (setf (gethash chord *terminal-translations*) ,name)))
 
 (deftrans "C-Space" 0)
 (deftrans "C-A" 1)
@@ -58,51 +58,51 @@
 (deftrans "C--" 31)
 (deftrans "Backspace" 127)
 
-(deftrans "M-A" '(#\Esc #\A) 225)
-(deftrans "M-B" '(#\Esc #\B) 226)
-(deftrans "M-C" '(#\Esc #\C) 227)
-(deftrans "M-D" '(#\Esc #\D) 228)
-(deftrans "M-E" '(#\Esc #\E) 229)
-(deftrans "M-F" '(#\Esc #\F) 230)
-(deftrans "M-G" '(#\Esc #\G) 231)
-(deftrans "M-H" '(#\Esc #\H) 232)
-(deftrans "M-I" '(#\Esc #\I) 233)
-(deftrans "M-J" '(#\Esc #\J) 234)
-(deftrans "M-K" '(#\Esc #\K) 235)
-(deftrans "M-L" '(#\Esc #\L) 236)
-(deftrans "M-M" '(#\Esc #\M) 237)
-(deftrans "M-N" '(#\Esc #\N) 238)
-(deftrans "M-O" '(#\Esc #\O) 239)
-(deftrans "M-P" '(#\Esc #\P) 240)
-(deftrans "M-Q" '(#\Esc #\Q) 241)
-(deftrans "M-R" '(#\Esc #\R) 242)
-(deftrans "M-S" '(#\Esc #\S) 243)
-(deftrans "M-T" '(#\Esc #\T) 244)
-(deftrans "M-U" '(#\Esc #\U) 245)
-(deftrans "M-V" '(#\Esc #\V) 246)
-(deftrans "M-W" '(#\Esc #\W) 247)
-(deftrans "M-X" '(#\Esc #\X) 248)
-(deftrans "M-Y" '(#\Esc #\Y) 249)
-(deftrans "M-Z" '(#\Esc #\Z) 250)
-(deftrans "M-0" '(#\Esc #\0) 176)
-(deftrans "M-1" '(#\Esc #\1) 177)
-(deftrans "M-2" '(#\Esc #\2) 178)
-(deftrans "M-3" '(#\Esc #\3) 179)
-(deftrans "M-4" '(#\Esc #\4) 180)
-(deftrans "M-5" '(#\Esc #\5) 181)
-(deftrans "M-6" '(#\Esc #\6) 182)
-(deftrans "M-7" '(#\Esc #\7) 183)
-(deftrans "M-8" '(#\Esc #\8) 184)
-(deftrans "M-9" '(#\Esc #\9) 185)
+(deftrans "M-A" (#\Esc #\A) 225)
+(deftrans "M-B" (#\Esc #\B) 226)
+(deftrans "M-C" (#\Esc #\C) 227)
+(deftrans "M-D" (#\Esc #\D) 228)
+(deftrans "M-E" (#\Esc #\E) 229)
+(deftrans "M-F" (#\Esc #\F) 230)
+(deftrans "M-G" (#\Esc #\G) 231)
+(deftrans "M-H" (#\Esc #\H) 232)
+(deftrans "M-I" (#\Esc #\I) 233)
+(deftrans "M-J" (#\Esc #\J) 234)
+(deftrans "M-K" (#\Esc #\K) 235)
+(deftrans "M-L" (#\Esc #\L) 236)
+(deftrans "M-M" (#\Esc #\M) 237)
+(deftrans "M-N" (#\Esc #\N) 238)
+(deftrans "M-O" (#\Esc #\O) 239)
+(deftrans "M-P" (#\Esc #\P) 240)
+(deftrans "M-Q" (#\Esc #\Q) 241)
+(deftrans "M-R" (#\Esc #\R) 242)
+(deftrans "M-S" (#\Esc #\S) 243)
+(deftrans "M-T" (#\Esc #\T) 244)
+(deftrans "M-U" (#\Esc #\U) 245)
+(deftrans "M-V" (#\Esc #\V) 246)
+(deftrans "M-W" (#\Esc #\W) 247)
+(deftrans "M-X" (#\Esc #\X) 248)
+(deftrans "M-Y" (#\Esc #\Y) 249)
+(deftrans "M-Z" (#\Esc #\Z) 250)
+(deftrans "M-0" (#\Esc #\0) 176)
+(deftrans "M-1" (#\Esc #\1) 177)
+(deftrans "M-2" (#\Esc #\2) 178)
+(deftrans "M-3" (#\Esc #\3) 179)
+(deftrans "M-4" (#\Esc #\4) 180)
+(deftrans "M-5" (#\Esc #\5) 181)
+(deftrans "M-6" (#\Esc #\6) 182)
+(deftrans "M-7" (#\Esc #\7) 183)
+(deftrans "M-8" (#\Esc #\8) 184)
+(deftrans "M-9" (#\Esc #\9) 185)
 
-(deftrans "Up-arrow"    '(#\Esc #\[ #\A))
-(deftrans "Down-arrow"  '(#\Esc #\[ #\B))
-(deftrans "Right-arrow" '(#\Esc #\[ #\C))
-(deftrans "Left-arrow"  '(#\Esc #\[ #\D))
-(deftrans "Insert"      '(#\Esc #\[ #\2 #\~))
-(deftrans "Delete"      '(#\Esc #\[ #\3 #\~))
-(deftrans "C-Delete"    '(#\Esc #\[ #\3 #\^))
-(deftrans "Page-up"     '(#\Esc #\[ #\5 #\~))
-(deftrans "Page-down"   '(#\Esc #\[ #\6 #\~))
-(deftrans "Home"        '(#\Esc #\[ #\7 #\~))
-(deftrans "End"         '(#\Esc #\[ #\8 #\~))
+(deftrans "Up-arrow"    (#\Esc #\[ #\A))
+(deftrans "Down-arrow"  (#\Esc #\[ #\B))
+(deftrans "Right-arrow" (#\Esc #\[ #\C))
+(deftrans "Left-arrow"  (#\Esc #\[ #\D))
+(deftrans "Insert"      (#\Esc #\[ #\2 #\~))
+(deftrans "Delete"      (#\Esc #\[ #\3 #\~))
+(deftrans "C-Delete"    (#\Esc #\[ #\3 #\^))
+(deftrans "Page-up"     (#\Esc #\[ #\5 #\~))
+(deftrans "Page-down"   (#\Esc #\[ #\6 #\~))
+(deftrans "Home"        (#\Esc #\[ #\7 #\~) (#\Esc #\[ #\1 #\~) (#\Esc #\[ #\H))
+(deftrans "End"         (#\Esc #\[ #\8 #\~) (#\Esc #\[ #\4 #\~) (#\Esc #\[ #\F))


Index: src/version.lisp-expr
diff -u src/version.lisp-expr:1.8 src/version.lisp-expr:1.9
--- src/version.lisp-expr:1.8	Mon Mar  1 08:28:38 2004
+++ src/version.lisp-expr	Fri Mar  5 04:21:46 2004
@@ -1 +1 @@
-0.15.4
+0.15.6





More information about the linedit-cvs mailing list