[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Thu May 13 04:59:11 UTC 2010


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

Modified Files:
	ChangeLog swank.lisp 
Log Message:
	* swank.lisp (*after-init-hook*, simple-break)
	(coerce-to-condition, use-threads-p, current-thread-id): Moved
	around in swank.lisp.
	(with-temp-package): Deleted; not used anywhere.
	(ensure-list): Use in SWANK-REQUIRE.


--- /project/slime/cvsroot/slime/ChangeLog	2010/05/11 13:11:13	1.2090
+++ /project/slime/cvsroot/slime/ChangeLog	2010/05/13 04:59:11	1.2091
@@ -1,3 +1,11 @@
+2010-05-13  Tobias C. Rittweiler <tcr at freebits.de>
+
+	* swank.lisp (*after-init-hook*, simple-break)
+	(coerce-to-condition, use-threads-p, current-thread-id): Moved
+	around in swank.lisp.
+	(with-temp-package): Deleted; not used anywhere.
+	(ensure-list): Use in SWANK-REQUIRE.
+
 2010-05-11  Stas Boukarev  <stassats at gmail.com>
 
 	* slime.el (slime-inspect-definition): New function,
--- /project/slime/cvsroot/slime/swank.lisp	2010/04/24 04:44:38	1.713
+++ /project/slime/cvsroot/slime/swank.lisp	2010/05/13 04:59:11	1.714
@@ -415,6 +415,8 @@
   (unless *log-output*
     (setq *log-output* (real-output-stream *error-output*))))
 
+(add-hook *after-init-hook* 'init-log-output)
+
 (defun real-input-stream (stream)
   (typecase stream
     (synonym-stream 
@@ -559,15 +561,6 @@
                 (when *interrupt-queued-handler*
                   (funcall *interrupt-queued-handler*)))))))
 
-(defslimefun simple-break (&optional (datum "Interrupt from Emacs") &rest args)
-  (with-simple-restart (continue "Continue from break.")
-    (invoke-slime-debugger (coerce-to-condition datum args))))
-
-(defun coerce-to-condition (datum args)
-  (etypecase datum
-    (string (make-condition 'simple-error :format-control datum 
-                            :format-arguments args))
-    (symbol (apply #'make-condition datum args))))
 
 (defmacro with-io-redirection ((connection) &body body)
   "Execute BODY I/O redirection to CONNECTION. "
@@ -607,13 +600,6 @@
                       `(,getter ,',var))))
          , at body))))
 
-(defmacro with-temp-package (var &body body)
-  "Execute BODY with VAR bound to a temporary package.
-The package is deleted before returning."
-  `(let ((,var (make-package (gensym "TEMP-PACKAGE-"))))
-     (unwind-protect (progn , at body)
-       (delete-package ,var))))
-
 (defmacro do-symbols* ((var &optional (package '*package*) result-form) &body body)
   "Just like do-symbols, but makes sure a symbol is visited only once."
   (let ((seen-ht (gensym "SEEN-HT")))
@@ -623,12 +609,6 @@
           (setf (gethash ,var ,seen-ht) t)
           (tagbody , at body))))))
 
-(defun use-threads-p ()
-  (eq (connection.communication-style *emacs-connection*) :spawn))
-
-(defun current-thread-id ()
-  (thread-id (current-thread)))
-
 (defmacro define-special (name doc)
   "Define a special variable NAME with doc string DOC.
 This is like defvar, but NAME will not be initialized."
@@ -637,9 +617,17 @@
     (setf (documentation ',name 'variable) ,doc)))
 
 
-;;;;; Logging
+;;;;; Misc
 
-(add-hook *after-init-hook* 'init-log-output)
+(defun use-threads-p ()
+  (eq (connection.communication-style *emacs-connection*) :spawn))
+
+(defun current-thread-id ()
+  (thread-id (current-thread)))
+
+(declaim (inline ensure-list))
+(defun ensure-list (thing)
+  (if (listp thing) thing (list thing)))
 
 
 ;;;;; Symbols
@@ -2706,6 +2694,16 @@
 (defslimefun sldb-continue ()
   (continue))
 
+(defun coerce-to-condition (datum args)
+  (etypecase datum
+    (string (make-condition 'simple-error :format-control datum 
+                            :format-arguments args))
+    (symbol (apply #'make-condition datum args))))
+
+(defslimefun simple-break (&optional (datum "Interrupt from Emacs") &rest args)
+  (with-simple-restart (continue "Continue from break.")
+    (invoke-slime-debugger (coerce-to-condition datum args))))
+
 (defun coerce-restart (restart-designator)
   (when (or (typep restart-designator 'restart)
             (typep restart-designator '(and symbol (not null))))
@@ -2924,7 +2922,7 @@
 
 (defslimefun swank-require (modules &optional filename)
   "Load the module MODULE."
-  (dolist (module (if (listp modules) modules (list modules)))
+  (dolist (module (ensure-list modules))
     (unless (member (string module) *modules* :test #'string=)
       (require module (if filename
                           (filename-to-pathname filename)





More information about the slime-cvs mailing list