[slime-cvs] CVS slime

CVS User sboukarev sboukarev at common-lisp.net
Wed Jan 20 14:11:06 UTC 2010


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

Modified Files:
	ChangeLog slime.el 
Log Message:
* slime.el (slime-thread-kill): If the region is active, then
kill all threads in the region.


--- /project/slime/cvsroot/slime/ChangeLog	2010/01/19 21:18:46	1.1966
+++ /project/slime/cvsroot/slime/ChangeLog	2010/01/20 14:11:06	1.1967
@@ -1,3 +1,8 @@
+2010-01-20  Stas Boukarev  <stassats at gmail.com>
+
+	* slime.el (slime-thread-kill): If the region is active, then
+	kill all threads in the region.
+
 2010-01-19  Stas Boukarev  <stassats at gmail.com>
 
 	* swank-rpc.lisp (:swank-rpc): (:use :cl), SBCL
@@ -5,8 +10,8 @@
 
 2010-01-19  Terje Norderhaug  <terje at in-progress.com>
 
-	* Refactorized parts of slime.lisp into a new swank-rpc module. 
-	
+	* Refactorized parts of slime.lisp into a new swank-rpc module.
+
 2010-01-14  Stas Boukarev  <stassats at gmail.com>
 
 	* doc/slime.texi (Setting up the lisp image):
--- /project/slime/cvsroot/slime/slime.el	2010/01/05 21:17:52	1.1264
+++ /project/slime/cvsroot/slime/slime.el	2010/01/20 14:11:06	1.1265
@@ -6202,10 +6202,27 @@
 
 (defun slime-thread-kill ()
   (interactive)
-  (let ((id (get-text-property (point) 'thread-id)))
-    (slime-eval `(swank:kill-nth-thread ,id)))
+  (slime-eval `(cl:mapc 'swank:kill-nth-thread
+                        ',(slime-get-properties 'thread-id)))
   (call-interactively 'slime-list-threads))
 
+(defun slime-get-region-properties (prop start end)
+  (loop for position = (if (get-text-property start prop)
+                           start
+                           (next-single-property-change start prop))
+        then (next-single-property-change position prop)
+        while (<= position end)
+        collect (get-text-property position prop)))
+
+(defun slime-get-properties (prop)
+  (if (use-region-p)
+      (slime-get-region-properties prop
+                                   (region-beginning)
+                                   (region-end))
+      (let ((value (get-text-property (point) prop)))
+        (when value
+          (list value)))))
+
 (defun slime-thread-attach ()
   (interactive)
   (let ((id (get-text-property (point) 'thread-id))





More information about the slime-cvs mailing list