CVS slime

CVS User heller heller at common-lisp.net
Sun Nov 10 07:56:21 UTC 2013


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

Modified Files:
	ChangeLog slime.el swank.lisp 
Log Message:
* swank.lisp (swank-profile-package): New wrapper for
profile-package that does some input validation.
* slime.el (slime-profile-package): Use it.

--- /project/slime/cvsroot/slime/ChangeLog	2013/11/01 15:38:50	1.2409
+++ /project/slime/cvsroot/slime/ChangeLog	2013/11/10 07:56:20	1.2410
@@ -1,3 +1,9 @@
+2013-11-10  Helmut Eller  <heller at common-lisp.net>
+
+	* swank.lisp (swank-profile-package): New wrapper for
+	profile-package that does some input validation.
+	* slime.el (slime-profile-package): Use it.
+
 2013-11-01  Helmut Eller  <heller at common-lisp.net>
 
 	* swank-ccl.lisp (p2-definitions): Check bounds before accessing
--- /project/slime/cvsroot/slime/slime.el	2013/04/23 16:37:14	1.1430
+++ /project/slime/cvsroot/slime/slime.el	2013/11/10 07:56:20	1.1431
@@ -800,8 +800,8 @@
 (defun slime-read-package-name (prompt &optional initial-value)
   "Read a package name from the minibuffer, prompting with PROMPT."
   (let ((completion-ignore-case t))
-    (completing-read prompt (slime-bogus-completion-alist 
-                             (slime-eval 
+    (completing-read prompt (slime-bogus-completion-alist
+                             (slime-eval
                               `(swank:list-all-package-names t)))
 		     nil t initial-value)))
 
@@ -4490,15 +4490,15 @@
                     (lambda (r) (message "%s" r))))
 
 (defun slime-profile-package (package callers methods)
-  "Profile all functions in PACKAGE.  
+  "Profile all functions in PACKAGE.
 If CALLER is non-nil names have counts of the most common calling
-functions recorded. 
+functions recorded.
 If METHODS is non-nil, profile all methods of all generic function
 having names in the given package."
   (interactive (list (slime-read-package-name "Package: ")
                      (y-or-n-p "Record the most common callers? ")
                      (y-or-n-p "Profile methods? ")))
-  (slime-eval-async `(swank:profile-package ,package ,callers ,methods)
+  (slime-eval-async `(swank:swank-profile-package ,package ,callers ,methods)
                     (lambda (r) (message "%s" r))))
 
 (defun slime-profile-by-substring (substring &optional package)
--- /project/slime/cvsroot/slime/swank.lisp	2013/01/11 09:00:30	1.803
+++ /project/slime/cvsroot/slime/swank.lisp	2013/11/10 07:56:21	1.804
@@ -13,7 +13,7 @@
 (defpackage :swank
   (:use :cl :swank-backend :swank-match :swank-rpc)
   (:export #:startup-multiprocessing
-           #:start-server 
+           #:start-server
            #:create-server
            #:stop-server
            #:restart-server
@@ -2910,6 +2910,13 @@
             (maybe-profile symbol))))
     (format nil "~a function~:p ~:*~[are~;is~:;are~] now profiled" count)))
 
+(defslimefun swank-profile-package (package-name callersp methodsp)
+  (let ((pkg (or (guess-package package-name)
+                 (error "Not a valid package name: ~s" package-name))))
+    (check-type callersp boolean)
+    (check-type methodsp boolean)
+    (profile-package pkg callersp methodsp)))
+
 
 ;;;; Source Locations
 




More information about the slime-cvs mailing list