[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Sun Feb 3 08:38:26 UTC 2008


Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv26552/Drei

Modified Files:
	basic-commands.lisp drei.lisp 
Log Message:
Changed how self-insert gestures work in Drei a bit.


--- /project/mcclim/cvsroot/mcclim/Drei/basic-commands.lisp	2008/01/18 11:00:22	1.11
+++ /project/mcclim/cvsroot/mcclim/Drei/basic-commands.lisp	2008/02/03 08:38:25	1.12
@@ -511,14 +511,20 @@
 ;;; These are what do the basic keypress->character inserted in buffer
 ;;; mapping.
 
-(define-command com-self-insert ((count 'integer :default 1))
-  (loop repeat count do (insert-character *current-gesture*)))
+(define-command com-self-insert
+    ((count 'integer :default 1))
+  "Insert the gesture used to invoke this command into the
+current buffer `count' times. `Count' should get its value from
+the numeric arguments."
+  (loop repeat count
+        do (insert-character *current-gesture*)))
 
-(loop for code from (char-code #\Space) to (char-code #\~)
-      do (set-key `(com-self-insert ,*numeric-argument-marker*)
-	     'self-insert-table
-	     (list (list (code-char code)))))
+(defmethod command-for-unbound-gestures ((view textual-drei-syntax-view) gestures)
+  (when (and (= (length gestures))
+             (characterp (first gestures))
+             (graphic-char-p (first gestures)))
+    `(com-self-insert ,*numeric-argument-marker*)))
 
 (set-key `(com-self-insert ,*numeric-argument-marker*)
-	 'self-insert-table
+         'self-insert-table
 	 '((#\Newline)))
--- /project/mcclim/cvsroot/mcclim/Drei/drei.lisp	2008/01/30 21:21:43	1.36
+++ /project/mcclim/cvsroot/mcclim/Drei/drei.lisp	2008/02/03 08:38:25	1.37
@@ -381,6 +381,9 @@
   (print-unreadable-object (object stream :type t :identity t)
     (format stream "~A" (type-of (view object)))))
 
+(defmethod command-for-unbound-gestures ((drei drei) gestures)
+  (command-for-unbound-gestures (view drei) gestures))
+
 ;; Main redisplay entry point.
 (defgeneric display-drei (drei &key redisplay-minibuffer)
   (:documentation "`Drei' must be an object of type `drei' and




More information about the Mcclim-cvs mailing list