[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Sat Jan 5 21:07:16 UTC 2008


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

Modified Files:
	lisp-syntax.lisp 
Log Message:
Made Backward Expression behave more like Emacs.

Also added a currently-failing test case for Forward Expression, I
couldn't figure out a simple way to handle the situation, and I fear
special-casing will be necessary.


--- /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax.lisp	2008/01/05 14:23:16	1.51
+++ /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax.lisp	2008/01/05 21:07:16	1.52
@@ -2012,9 +2012,13 @@
   (update-parse syntax 0 (offset mark))
   (let ((potential-form (or (form-before syntax (offset mark))
 			    (form-around syntax (offset mark)))))
-    (when (and (not (null potential-form))
-               (not (= (offset mark) (start-offset potential-form))))
-	(setf (offset mark) (start-offset potential-form)))))
+    (loop until (null potential-form)
+       do (cond ((= (offset mark) (start-offset potential-form))
+                 (setf potential-form
+                       (unless (form-at-top-level-p potential-form)
+                         (parent potential-form))))
+                (t (setf (offset mark) (start-offset potential-form))
+                   (return t))))))
 
 (defmethod forward-one-expression (mark (syntax lisp-syntax))
   (update-parse syntax 0 (offset mark))
@@ -2022,7 +2026,7 @@
 			    (form-around syntax (offset mark)))))
     (when (and (not (null potential-form))
                (not (= (offset mark) (end-offset potential-form))))
-	(setf (offset mark) (end-offset potential-form)))))
+      (setf (offset mark) (end-offset potential-form)))))
 
 (defmethod forward-delete-expression (mark (syntax lisp-syntax) &optional (count 1)
                                       (limit-action #'error-limit-action))




More information about the Mcclim-cvs mailing list