[gsharp-cvs] CVS gsharp

rstrandh rstrandh at common-lisp.net
Tue Jun 13 19:39:56 UTC 2006


Update of /project/gsharp/cvsroot/gsharp
In directory clnet:/tmp/cvs-serv31399

Modified Files:
	gui.lisp modes.lisp packages.lisp 
Log Message:
Implemented commands to go to the beginning and to the end of the 
score, bound to M-< and M-> respectively.


--- /project/gsharp/cvsroot/gsharp/gui.lisp	2006/06/01 04:57:10	1.64
+++ /project/gsharp/cvsroot/gsharp/gui.lisp	2006/06/13 19:39:56	1.65
@@ -855,6 +855,26 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;
+;;; motion by entire score
+
+(define-gsharp-command com-end-of-score ()
+  (loop until (last-segment-p (current-cursor))
+        do (forward-segment (current-cursor)))
+  (loop until (last-bar-p (current-cursor))
+        do (forward-bar (current-cursor)))
+  (loop until (end-of-bar-p (current-cursor))
+        do (forward-element (current-cursor))))
+
+(define-gsharp-command com-beginning-of-score ()
+  (loop until (first-segment-p (current-cursor))
+        do (backward-segment (current-cursor)))
+  (loop until (first-bar-p (current-cursor))
+        do (backward-bar (current-cursor)))
+  (loop until (beginning-of-bar-p (current-cursor))
+        do (backward-element (current-cursor))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
 ;;; delete commands
 
 (defun go-to-beginning-of-bar (cursor)
--- /project/gsharp/cvsroot/gsharp/modes.lisp	2006/06/05 10:06:58	1.15
+++ /project/gsharp/cvsroot/gsharp/modes.lisp	2006/06/13 19:39:56	1.16
@@ -12,6 +12,9 @@
 
 (set-key 'com-insert-measure-bar 'global-gsharp-table '(#\|))
 
+(set-key 'com-end-of-score 'global-gsharp-table '((#\> :shift :meta)))
+(set-key 'com-beginning-of-score 'global-gsharp-table '((#\< :shift :meta)))
+
 ;;; FIXME where are the corresponding commands?
 (set-key 'com-left 'global-gsharp-table '((#\l :meta)))
 (set-key 'com-right 'global-gsharp-table '((#\r :meta)))
--- /project/gsharp/cvsroot/gsharp/packages.lisp	2006/06/12 18:25:32	1.55
+++ /project/gsharp/cvsroot/gsharp/packages.lisp	2006/06/13 19:39:56	1.56
@@ -150,6 +150,7 @@
 	   #:head-slice #:body-slice #:tail-slice
 	   #:in-last-slice #:in-first-slice
 	   #:select-layer #:delete-layer
+           #:first-segment-p #:last-segment-p
 	   #:forward-segment #:backward-segment
 	   #:insert-segment-before #:insert-segment-after
 	   #:delete-segment




More information about the Gsharp-cvs mailing list