[gsharp-cvs] CVS gsharp
crhodes
crhodes at common-lisp.net
Mon May 22 13:39:31 UTC 2006
Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv5529
Modified Files:
gui.lisp modes.lisp
Log Message:
Movement by measure, bound to M-C-f and M-C-b.
--- /project/gsharp/cvsroot/gsharp/gui.lisp 2006/05/14 07:51:27 1.60
+++ /project/gsharp/cvsroot/gsharp/gui.lisp 2006/05/22 13:39:30 1.61
@@ -842,6 +842,22 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
+;;; motion by measure
+
+(define-gsharp-command com-forward-measure ((count 'integer :prompt "Number of Measures"))
+ (let ((cursor (current-cursor)))
+ (loop repeat count do
+ (loop do (forward-element cursor)
+ until (end-of-bar-p cursor))))
+
+(define-gsharp-command com-backward-measure ((count 'integer :prompt "Number of Measures"))
+ (let ((cursor (current-cursor)))
+ (loop repeat count do
+ (loop do (backward-element cursor)
+ until (beginning-of-bar-p cursor))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
;;; delete commands
(defun go-to-beginning-of-bar (cursor)
--- /project/gsharp/cvsroot/gsharp/modes.lisp 2006/05/14 07:49:55 1.12
+++ /project/gsharp/cvsroot/gsharp/modes.lisp 2006/05/22 13:39:30 1.13
@@ -5,7 +5,10 @@
(set-key `(com-forward-element ,*numeric-argument-marker*) 'global-gsharp-table '((#\f :control)))
(set-key `(com-backward-element ,*numeric-argument-marker*) 'global-gsharp-table '((#\b :control)))
+(set-key `(com-forward-measure ,*numeric-argument-marker*) 'global-gsharp-table '((#\f :control :meta)))
+(set-key `(com-backward-measure ,*numeric-argument-marker*) 'global-gsharp-table '((#\b :control :meta)))
(set-key `(com-delete-element ,*numeric-argument-marker*) 'global-gsharp-table '((#\d :control)))
+
(set-key 'com-insert-measure-bar 'global-gsharp-table '(#\|))
(set-key 'com-erase-element 'global-gsharp-table '((#\h :control)))
More information about the Gsharp-cvs
mailing list