[Lisppaste-cvs] CVS update: lisppaste2/README.lisp lisppaste2/persistent-pastes.lisp

Brian Mastenbrook bmastenbrook at common-lisp.net
Sat Jan 17 18:34:37 UTC 2004


Update of /project/lisppaste/cvsroot/lisppaste2
In directory common-lisp.net:/tmp/cvs-serv21216

Modified Files:
	README.lisp persistent-pastes.lisp 
Log Message:
More bugfixen

Date: Sat Jan 17 13:34:37 2004
Author: bmastenbrook

Index: lisppaste2/README.lisp
diff -u lisppaste2/README.lisp:1.2 lisppaste2/README.lisp:1.3
--- lisppaste2/README.lisp:1.2	Sat Jan 17 13:22:35 2004
+++ lisppaste2/README.lisp	Sat Jan 17 13:34:37 2004
@@ -1,4 +1,4 @@
-;;;; $Id: README.lisp,v 1.2 2004/01/17 18:22:35 bmastenbrook Exp $
+;;;; $Id: README.lisp,v 1.3 2004/01/17 18:34:37 bmastenbrook Exp $
 ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/README.lisp,v $
 
 ;;;; See the LICENSE file for licensing information.
@@ -12,8 +12,8 @@
 ;;; from your httpd.conf. Then, run SBCL and invoke the magical
 ;;; invocation as follows, or simply (load "README").
 
-(load "lisppaste.asd")
-(asdf:oos 'asdf:load-op :lisppaste)
+(require :asdf)
+(require :lisppaste)
 
 (lisppaste:start-lisppaste :channels '("#lisppaste")
                            :nickname "devpaste"


Index: lisppaste2/persistent-pastes.lisp
diff -u lisppaste2/persistent-pastes.lisp:1.4 lisppaste2/persistent-pastes.lisp:1.5
--- lisppaste2/persistent-pastes.lisp:1.4	Sat Jan 17 13:29:41 2004
+++ lisppaste2/persistent-pastes.lisp	Sat Jan 17 13:34:37 2004
@@ -11,10 +11,11 @@
    (cons 'annotations (mapcar #'paste-alist (paste-annotations paste)))))
 
 (defun save-pastes-to-file (file-name)
-  (with-open-file (file file-name :direction :output :if-exists :supersede)
-		  (let ((*print-readably* t))
-		    (format file "~A~%" (prin1-to-string
-				       (mapcar #'paste-alist *pastes*))))))
+  (let ((*package* (find-package :lisppaste)))
+    (with-open-file (file file-name :direction :output :if-exists :supersede)
+      (let ((*print-readably* t))
+        (format file "~A~%" (prin1-to-string
+                             (mapcar #'paste-alist *pastes*)))))))
 
 (defmacro with-assoc-vals (entry-list alist &body body)
   `(let ,(mapcar #'(lambda (e) (list e `(cdr (assoc ',e ,alist)))) entry-list)
@@ -33,6 +34,7 @@
 
 (defun read-pastes-from-file (file-name)
   (setf *pastes* nil)
-  (with-open-file (file file-name :direction :input :if-does-not-exist nil)
-    (let ((paste-alist (read file nil)))
-      (setf *pastes* (mapcar #'make-paste-from-alist paste-alist)))))
\ No newline at end of file
+  (let ((*package* (find-package :lisppaste)))
+    (with-open-file (file file-name :direction :input :if-does-not-exist nil)
+      (let ((paste-alist (read file nil)))
+        (setf *pastes* (mapcar #'make-paste-from-alist paste-alist))))))
\ No newline at end of file





More information about the Lisppaste-cvs mailing list