[slime-cvs] CVS slime/contrib

CVS User nsiivola nsiivola at common-lisp.net
Sat Oct 11 17:13:18 UTC 2008


Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv29635/contrib

Modified Files:
	ChangeLog slime-scratch.el 
Log Message:
persistent scratch buffer

  Setting slime-sratch-file make slime-scratch use that file to back
  the scratch buffer, making it persistent.


--- /project/slime/cvsroot/slime/contrib/ChangeLog	2008/09/13 10:39:02	1.130
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2008/10/11 17:13:18	1.131
@@ -1,3 +1,10 @@
+2008-10-11  Nikodemus Siivola <nikodemus at random-state.net>
+
+	* slime-scratch.el (slime-scratch-file): New variable.
+	(slime-scratch-buffer): If *slime-scratch* does not exist and
+	slime-scratch-file is set, use 'find-file' instead of
+	`get-buffer-create' to obtain the buffer.
+
 2008-09-13  Tobias C. Rittweiler  <tcr at freebits.de>
 
 	* slime-parse.el (slime-has-symbol-syntax-p): New.
--- /project/slime/cvsroot/slime/contrib/slime-scratch.el	2007/09/20 14:55:53	1.4
+++ /project/slime/cvsroot/slime/contrib/slime-scratch.el	2008/10/11 17:13:18	1.5
@@ -28,10 +28,15 @@
   (unless (eq (current-buffer) (window-buffer))
     (pop-to-buffer (current-buffer) t)))
 
+(defvar slime-scratch-file nil)
+
 (defun slime-scratch-buffer ()
   "Return the scratch buffer, create it if necessary."
   (or (get-buffer "*slime-scratch*")
-      (with-current-buffer (get-buffer-create "*slime-scratch*")
+      (with-current-buffer (if slime-scratch-file
+                               (find-file slime-scratch-file)
+                             (get-buffer-create "*slime-scratch*"))
+        (rename-buffer "*slime-scratch*")
 	(lisp-mode)
 	(use-local-map slime-scratch-mode-map)
 	(slime-mode t)





More information about the slime-cvs mailing list