[climacs-cvs] CVS climacs

thenriksen thenriksen at common-lisp.net
Sun Apr 30 15:20:46 UTC 2006


Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv5841

Modified Files:
	packages.lisp buffer.lisp 
Log Message:
Added `buffer-substring' function.


--- /project/climacs/cvsroot/climacs/packages.lisp	2006/04/23 19:37:58	1.89
+++ /project/climacs/cvsroot/climacs/packages.lisp	2006/04/30 15:20:46	1.90
@@ -40,6 +40,7 @@
 	   #:buffer-line-number #:buffer-column-number
 	   #:line-number #:column-number
 	   #:insert-buffer-object #:insert-buffer-sequence
+           #:buffer-substring
 	   #:insert-object #:insert-sequence
 	   #:delete-buffer-range #:delete-range
 	   #:delete-region
--- /project/climacs/cvsroot/climacs/buffer.lisp	2006/04/23 12:40:31	1.32
+++ /project/climacs/cvsroot/climacs/buffer.lisp	2006/04/30 15:20:46	1.33
@@ -562,7 +562,12 @@
 	    for i upfrom 0
 	    do (setf (aref result i) (buffer-object buffer offset))
 	    finally (return result))
-      (make-array 0)))  
+      (make-array 0)))
+
+(defun buffer-substring (buffer start end)
+  "Return a string of the contents of buffer from `start' to
+`end', which must be offsets."
+  (coerce (buffer-sequence buffer start end) 'string))
 
 (defgeneric object-before (mark)
   (:documentation "Return the object that is immediately before the mark.  If mark is at




More information about the Climacs-cvs mailing list