Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv28772/Drei
Modified Files:
basic-commands.lisp editing.lisp
Log Message:
Fixed some problems with editing functions not returning T when
succesful, and editing commands not handling the proper errors.
--- /project/mcclim/cvsroot/mcclim/Drei/basic-commands.lisp 2007/12/19 11:02:05 1.9
+++ /project/mcclim/cvsroot/mcclim/Drei/basic-commands.lisp 2007/12/21 14:22:07 1.10
@@ -310,14 +310,16 @@
((count 'integer :prompt ,(concat "Number of " plural) :default 1))
,(concat "Delete from point until the next " noun " end.
With a positive numeric argument, delete that many " plural " forward.")
- (,backward-delete (point) (current-syntax) count))
+ (handling-motion-limit-errors (,plural)
+ (,backward-delete (point) (current-syntax) count)))
;; Backward Delete Unit
(define-command (,com-backward-delete :name t :command-table ,command-table)
((count 'integer :prompt ,(concat "Number of " plural) :default 1))
,(concat "Delete from point until the previous " noun " beginning.
With a positive numeric argument, delete that many " plural " backward.")
- (,backward-delete (point) (current-syntax) count)))))))
+ (handling-motion-limit-errors (,plural)
+ (,backward-delete (point) (current-syntax) count))))))))
(defmacro define-editing-commands (unit command-table &key
noun
--- /project/mcclim/cvsroot/mcclim/Drei/editing.lisp 2007/12/19 11:02:02 1.8
+++ /project/mcclim/cvsroot/mcclim/Drei/editing.lisp 2007/12/21 14:22:07 1.9
@@ -82,8 +82,9 @@
(mark syntax &optional (count 1)
(limit-action #'error-limit-action))
(let ((mark2 (clone-mark mark)))
- (,forward mark2 syntax count limit-action)
- (delete-region mark mark2)))
+ (when (,forward mark2 syntax count limit-action)
+ (delete-region mark mark2)
+ t)))
(defmethod ,forward-delete :around
(mark syntax &optional (count 1)
(limit-action #'error-limit-action))
@@ -100,8 +101,9 @@
(mark syntax &optional (count 1)
(limit-action #'error-limit-action))
(let ((mark2 (clone-mark mark)))
- (,backward mark2 syntax count limit-action)
- (delete-region mark mark2)))
+ (when (,backward mark2 syntax count limit-action)
+ (delete-region mark mark2)
+ t)))
(defmethod ,backward-delete :around
(mark syntax &optional (count 1)
(limit-action #'error-limit-action))
@@ -128,7 +130,8 @@
(region-to-sequence start mark)))
(kill-ring-standard-push *kill-ring*
(region-to-sequence start mark)))
- (delete-region start mark))))
+ (delete-region start mark)
+ t)))
(defmethod ,forward-kill :around
(mark syntax &optional (count 1) concatenate-p
(limit-action #'error-limit-action))
@@ -156,7 +159,8 @@
(region-to-sequence start mark)))
(kill-ring-standard-push *kill-ring*
(region-to-sequence start mark)))
- (delete-region start mark))))
+ (delete-region start mark)
+ t)))
(defmethod ,backward-kill :around
(mark syntax &optional (count 1) concatenate-p
(limit-action #'error-limit-action))