[slime-cvs] CVS slime/contrib

CVS User sboukarev sboukarev at common-lisp.net
Fri Feb 1 10:03:42 UTC 2013


Update of /project/slime/cvsroot/slime/contrib
In directory tiger.common-lisp.net:/tmp/cvs-serv14838

Modified Files:
	ChangeLog swank-asdf.lisp 
Log Message:
* swank-asdf.lisp (asdf-determine-system): Return the name of a
system.
Reported by Tamas Papp.


--- /project/slime/cvsroot/slime/contrib/ChangeLog	2013/01/29 16:17:24	1.565
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2013/02/01 10:03:41	1.566
@@ -1,3 +1,9 @@
+2013-02-01  Stas Boukarev  <stassats at gmail.com>
+
+	* swank-asdf.lisp (asdf-determine-system): Return the name of a
+	system.
+	Reported by Tamas Papp.
+
 2013-01-29  Francois-Rene Rideau <tunes at google.com>
 
 	* swank-asdf.lisp: Better upcoming ASDF3 support.
--- /project/slime/cvsroot/slime/contrib/swank-asdf.lisp	2013/01/29 16:17:24	1.37
+++ /project/slime/cvsroot/slime/contrib/swank-asdf.lisp	2013/02/01 10:03:42	1.38
@@ -448,21 +448,26 @@
 (defun pathname-system (pathname)
   (let ((component (pathname-component pathname)))
     (when component
-      (asdf:component-system component))))
+      (asdf:component-name (asdf:component-system component)))))
 
 (defslimefun asdf-determine-system (file buffer-package-name)
   (or
-   (pathname-system file)
-   (progn ; If not found, let's rebuild the table first
-     (recompute-pathname-component-table)
-     (pathname-system file))
+   (and file
+        (pathname-system file))
+   (and file
+        (progn
+          ;; If not found, let's rebuild the table first
+          (recompute-pathname-component-table)
+          (pathname-system file)))
    ;; If we couldn't find an already defined system,
    ;; try finding a system that's named like BUFFER-PACKAGE-NAME.
-   (loop :with package = (guess-buffer-package buffer-package-name)
-         :for name :in (package-names package)
-         :for system = (asdf:find-system (asdf::coerce-name name) nil)
-         :when system :do (register-system-pathnames system)
-         :thereis (pathname-system file))))
+   (loop with package = (guess-buffer-package buffer-package-name)
+         for name in (package-names package)
+         for system = (asdf:find-system (asdf::coerce-name name) nil)
+         when (and system
+                   (or (not file)
+                       (pathname-system file)))
+         return (asdf:component-name system))))
 
 (defslimefun delete-system-fasls (name)
   (let ((removed-count





More information about the slime-cvs mailing list