[gsharp-cvs] CVS update: gsharp/buffer.lisp gsharp/gui.lisp gsharp/packages.lisp
Robert Strandh
rstrandh at common-lisp.net
Tue Nov 1 18:08:03 UTC 2005
Update of /project/gsharp/cvsroot/gsharp
In directory common-lisp.net:/tmp/cvs-serv8373
Modified Files:
buffer.lisp gui.lisp packages.lisp
Log Message:
Removed MAKE-INITIALIZED-BUFFER
Date: Tue Nov 1 19:08:02 2005
Author: rstrandh
Index: gsharp/buffer.lisp
diff -u gsharp/buffer.lisp:1.19 gsharp/buffer.lisp:1.20
--- gsharp/buffer.lisp:1.19 Tue Nov 1 01:23:26 2005
+++ gsharp/buffer.lisp Tue Nov 1 19:08:02 2005
@@ -852,18 +852,16 @@
(defmethod initialize-instance :after ((b buffer) &rest args)
(declare (ignore args))
- (loop for segment in (segments b)
- do (setf (buffer segment) b)))
+ (with-slots (segments) b
+ (when (null segments)
+ (add-segment (make-instance 'segment :staff (car (staves b))) b 0))
+ (loop for segment in segments
+ do (setf (buffer segment) b))))
(defmethod print-object :after ((b buffer) stream)
(with-slots (staves segments min-width spacing-style right-edge left-offset left-margin) b
(format stream ":staves ~W :segments ~W :min-width ~W :spacing-style ~W :right-edge ~W :left-offset ~W :left-margin ~W "
staves segments min-width spacing-style right-edge left-offset left-margin)))
-
-(defun make-initialized-buffer ()
- (let ((buffer (make-instance 'buffer)))
- (add-segment (make-instance 'segment :staff (car (staves buffer))) buffer 0)
- buffer))
(defun read-buffer-v3 (stream char n)
(declare (ignore char n))
Index: gsharp/gui.lisp
diff -u gsharp/gui.lisp:1.35 gsharp/gui.lisp:1.36
--- gsharp/gui.lisp:1.35 Tue Nov 1 01:23:26 2005
+++ gsharp/gui.lisp Tue Nov 1 19:08:02 2005
@@ -218,7 +218,7 @@
("Quit" :command com-quit)))
(define-gsharp-command (com-new-buffer :name t) ()
- (let* ((buffer (make-initialized-buffer))
+ (let* ((buffer (make-instance 'buffer))
(cursor (make-initial-cursor buffer))
(staff (car (staves buffer)))
(input-state (make-input-state)))
@@ -541,7 +541,7 @@
(defun gsharp (&key new-process (process-name "Gsharp")
(width 900) (height 600))
"Start a Gsharp session"
- (let* ((buffer (make-initialized-buffer))
+ (let* ((buffer (make-instance 'buffer))
(staff (car (staves buffer)))
(input-state (make-input-state))
(cursor (make-initial-cursor buffer)))
Index: gsharp/packages.lisp
diff -u gsharp/packages.lisp:1.21 gsharp/packages.lisp:1.22
--- gsharp/packages.lisp:1.21 Tue Nov 1 01:23:26 2005
+++ gsharp/packages.lisp Tue Nov 1 19:08:02 2005
@@ -55,7 +55,6 @@
#:slice
#:segment #:slices #:sliceno
#:head #:body #:tail #:make-layer #:buffer
- #:make-initialized-buffer
#:layers #:nb-layers #:layerno
#:add-layer #:remove-layer #:segment
#:segments #:nb-segments #:segmentno #:staves
More information about the Gsharp-cvs
mailing list