[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Mon Dec 4 10:17:22 UTC 2006


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

Modified Files:
	undo.lisp drei.lisp 
Log Message:
Explicitly define the generic functions of some accessor methods.


--- /project/mcclim/cvsroot/mcclim/Drei/undo.lisp	2006/11/19 11:39:45	1.2
+++ /project/mcclim/cvsroot/mcclim/Drei/undo.lisp	2006/12/04 10:17:21	1.3
@@ -84,6 +84,10 @@
 (defclass undo-record () ()
   (:documentation "The base class for all undo records."))
 
+(defgeneric undo-tree (record)
+  (:documentation "The undo tree to which the undo record
+`record' belongs."))
+
 (defclass standard-undo-record (undo-record)
   ((parent :initform nil :accessor parent)
    (tree :initform nil
--- /project/mcclim/cvsroot/mcclim/Drei/drei.lisp	2006/11/30 17:33:31	1.9
+++ /project/mcclim/cvsroot/mcclim/Drei/drei.lisp	2006/12/04 10:17:21	1.10
@@ -128,24 +128,39 @@
 ;;;
 ;;; Undo
 
+(defgeneric undo-tree (buffer)
+  (:documentation "The undo-tree object associated with the
+buffer. This usually contains a record of every change that has
+been made to the buffer since it was created."))
+
+(defgeneric undo-accumulate (buffer)
+  (:documentation "A list of the changes that have been made to
+`buffer' since the last time undo was added to the undo tree for
+the buffer. The list returned by this function is initially
+NIL (the empty list). The :before methods on
+`insert-buffer-object', `insert-buffer-sequence', and
+`delete-buffer-range' push undo records on to this list."))
+
+(defgeneric performing-undo (buffer)
+  (:documentation "If true, the buffer is currently performing an
+undo operation. The :before methods on `insert-buffer-object',
+`insert-buffer-sequence', and `delete-buffer-range' push undo
+records onto the undo accumulator only if `performing-undo' is
+false, so that no undo information is added as a result of an
+undo operation."))
+
 (defclass undo-mixin ()
   ((tree :initform (make-instance 'standard-undo-tree)
          :reader undo-tree
          :documentation "Returns the undo-tree of the buffer.")
    (undo-accumulate :initform '()
                     :accessor undo-accumulate
-                    :documentation "The list returned by this
-function is initially NIL (the empty list). The :before methods
-on `insert-buffer-object', `insert-buffer-sequence', and
-`delete-buffer-range' push undo records on to this list.")
+                    :documentation "The undo records created
+since the start of the undo context.")
    (performing-undo :initform nil
                     :accessor performing-undo
-                    :documentation "This is initially NIL.
-The :before methods on `insert-buffer-object',
-`insert-buffer-sequence', and `delete-buffer-range' push undo
-records onto the undo accumulator only if this slot is NIL so
-that no undo information is added as a result of an undo
-operation."))
+                    :documentation "True if we are currently
+performing undo, false otherwise."))
   (:documentation "This is a mixin class that buffer classes can
 inherit from. It contains an undo tree, an undo accumulator and a
 flag specifyng whether or not it is currently performing




More information about the Mcclim-cvs mailing list