[climacs-cvs] CVS update: climacs/gui.lisp climacs/undo.lisp
Robert Strandh
rstrandh at common-lisp.net
Tue Jun 28 05:02:36 UTC 2005
Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv15953
Modified Files:
gui.lisp undo.lisp
Log Message:
Fixed a few bugs in the calls to undo and redo
(thanks to Dirk Gerrits for reporting these)
Date: Tue Jun 28 07:02:35 2005
Author: rstrandh
Index: climacs/gui.lisp
diff -u climacs/gui.lisp:1.147 climacs/gui.lisp:1.148
--- climacs/gui.lisp:1.147 Wed Jun 22 20:35:59 2005
+++ climacs/gui.lisp Tue Jun 28 07:02:34 2005
@@ -1300,11 +1300,13 @@
;;; Undo/redo
(define-named-command com-undo ()
- (undo (undo-tree (buffer (current-window))))
+ (handler-case (undo (undo-tree (buffer (current-window))))
+ (no-more-undo () (beep) (display-message "No more undo")))
(full-redisplay (current-window)))
(define-named-command com-redo ()
- (redo (undo-tree (buffer (current-window))))
+ (handler-case (redo (undo-tree (buffer (current-window))))
+ (no-more-undo () (beep) (display-message "No more redo")))
(full-redisplay (current-window)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Index: climacs/undo.lisp
diff -u climacs/undo.lisp:1.1 climacs/undo.lisp:1.2
--- climacs/undo.lisp:1.1 Mon Jan 24 14:12:52 2005
+++ climacs/undo.lisp Tue Jun 28 07:02:34 2005
@@ -65,8 +65,8 @@
(:documentation "Protocol class for all undo trees"))
(defclass standard-undo-tree (undo-tree)
- ((current-record :initform nil :accessor current-record)
- (leaf-record :initform nil :accessor leaf-record)
+ ((current-record :accessor current-record)
+ (leaf-record :accessor leaf-record)
(redo-path :initform '() :accessor redo-path)
(children :initform '() :accessor children)
(depth :initform 0 :reader depth))
@@ -74,7 +74,8 @@
(defmethod initialize-instance :after ((tree standard-undo-tree) &rest args)
(declare (ignore args))
- (setf (current-record tree) tree))
+ (setf (current-record tree) tree
+ (leaf-record tree) tree))
(defclass undo-record () ()
(:documentation "The protocol class for all undo records."))
More information about the Climacs-cvs
mailing list