[climacs-cvs] CVS update: climacs/lisp-syntax.lisp climacs/packages.lisp

Dave Murray dmurray at common-lisp.net
Fri Aug 5 08:07:18 UTC 2005


Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv12106

Modified Files:
	lisp-syntax.lisp packages.lisp 
Log Message:
Additional commands.

Date: Fri Aug  5 10:07:17 2005
Author: dmurray

Index: climacs/lisp-syntax.lisp
diff -u climacs/lisp-syntax.lisp:1.19 climacs/lisp-syntax.lisp:1.20
--- climacs/lisp-syntax.lisp:1.19	Thu Aug  4 03:10:45 2005
+++ climacs/lisp-syntax.lisp	Fri Aug  5 10:07:17 2005
@@ -850,7 +850,8 @@
 
 ;;;;;;;;;;;;;;;; pathname
 
-;;; FIXME: #P _must_ be followed by a string
+;;; NB: #P need not be followed by a string,
+;;;  as it could be followed by a #. construct instead (or some other reader macro)
 
 ;;; parse trees
 (defclass pathname-form (form) ())
@@ -1309,6 +1310,30 @@
 							(end-offset form))
 				       'string)))))))
 
+(defmethod beginning-of-definition (mark (syntax lisp-syntax))
+  (with-slots (stack-top) syntax
+    (loop for form in (children stack-top)
+	  with last-toplevel-list = nil
+	  when (and (typep form 'list-form)
+		    (mark< mark (end-offset form)))
+          do (if (mark< (start-offset form) mark)
+		 (setf (offset mark) (start-offset form))
+		 (when last-toplevel-list form
+		       (setf (offset mark) (start-offset last-toplevel-list))))
+	     (return t)
+	  when (typep form 'list-form)
+	  do (setf last-toplevel-list form)
+	  finally (when last-toplevel-list form
+		       (setf (offset mark) (start-offset last-toplevel-list))))))
+
+(defmethod end-of-definition (mark (syntax lisp-syntax))
+  (with-slots (stack-top) syntax
+    (loop for form in (children stack-top)
+	  when (and (typep form 'list-form)
+		    (mark< mark (end-offset form)))
+	  do (setf (offset mark) (end-offset form))
+	     (loop-finish))))
+
 ;;; shamelessly stolen from SWANK
 
 (defconstant keyword-package (find-package :keyword)
@@ -1495,6 +1520,9 @@
 (defmethod indent-form ((syntax lisp-syntax) (tree token-form) path)
   (values tree 0))
 
+(defmethod indent-form ((syntax lisp-syntax) (tree error-symbol) path)
+  (values tree 0))
+
 (defmethod indent-binding ((syntax lisp-syntax) tree path)
   (if (null (cdr path))
       ;; top level
@@ -1690,3 +1718,4 @@
 (defmethod uncomment-region ((syntax lisp-syntax) mark1 mark2)
   (line-uncomment-region syntax mark1 mark2))
 
+>>>>>>> 1.19


Index: climacs/packages.lisp
diff -u climacs/packages.lisp:1.73 climacs/packages.lisp:1.74
--- climacs/packages.lisp:1.73	Fri Aug  5 00:07:45 2005
+++ climacs/packages.lisp	Fri Aug  5 10:07:17 2005
@@ -109,8 +109,10 @@
            #:syntax-line-indentation
 	   #:forward-expression #:backward-expression
 	   #:eval-defun
+	   #:beginning-of-definition #:end-of-definition
 	   #:redisplay-pane-with-syntax
-	   #:beginning-of-paragraph #:end-of-paragraph
+	   #:backward-paragraph #:forward-paragraph
+	   #:backward-sentence #:forward-sentence
 	   #:syntax-line-comment-string
 	   #:line-comment-region #:comment-region
 	   #:line-uncomment-region #:uncomment-region))
@@ -119,7 +121,8 @@
   (:use :clim-lisp :flexichain)
   (:export #:kill-ring      #:kill-ring-length      #:kill-ring-max-size 
 	   #:reset-yank-position #:rotate-yank-position #:kill-ring-yank
-	   #:kill-ring-standard-push    #:kill-ring-concatenating-push))
+	   #:kill-ring-standard-push    #:kill-ring-concatenating-push
+	   #:kill-ring-reverse-concatenating-push))
 
 (defpackage :undo
   (:use :common-lisp)




More information about the Climacs-cvs mailing list