[slime-cvs] CVS slime/contrib

CVS User sboukarev sboukarev at common-lisp.net
Mon Jan 25 13:26:16 UTC 2010


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

Modified Files:
	ChangeLog slime-package-fu.el 
Log Message:
* contrib/slime-package-fu.el (slime-goto-next-export-clause): Use
" \n\t" for `skip-chars-forward' instead of [:alpha:],
because it doesn't work for some reason.
(slime-search-exports-in-defpackage): take #:symbol and :symbol
into account too.


--- /project/slime/cvsroot/slime/contrib/ChangeLog	2010/01/14 21:53:11	1.340
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2010/01/25 13:26:15	1.341
@@ -1,3 +1,11 @@
+2010-01-25  Stas Boukarev  <stassats at gmail.com>
+
+	* slime-package-fu.el (slime-goto-next-export-clause): Use
+	" \n\t" for `skip-chars-forward' instead of [:alpha:],
+	because it doesn't work for some reason.
+	(slime-search-exports-in-defpackage): take #:symbol and :symbol
+	into account too.
+
 2010-01-14  Stas Boukarev  <stassats at gmail.com>
 
 	* slime-repl.el: Revert the previous change because it
--- /project/slime/cvsroot/slime/contrib/slime-package-fu.el	2009/12/21 13:31:56	1.7
+++ /project/slime/cvsroot/slime/contrib/slime-package-fu.el	2010/01/25 13:26:16	1.8
@@ -94,7 +94,7 @@
     (save-excursion
       (block nil
 	(while (ignore-errors (slime-forward-sexp) t)
-	  (skip-chars-forward "[:space:]")
+          (skip-chars-forward " \n\t")
 	  (when (slime-at-expression-p '(:export *))
 	    (setq point (point))
 	    (return)))))
@@ -105,14 +105,17 @@
 (defun slime-search-exports-in-defpackage (symbol-name)
   "Look if `symbol-name' is mentioned in one of the :EXPORT clauses."
   ;; Assumes we're inside the beginning of a DEFPACKAGE form.
-  (save-excursion
-    (block nil
-      (while (ignore-errors (slime-goto-next-export-clause) t)
-	(let ((clause-end (save-excursion (forward-sexp) (point))))
-	  (when (and (search-forward symbol-name clause-end t)
-		     (equal (slime-symbol-at-point) symbol-name))
-	    (return (point))))))))
-
+  (flet ((target-symbol-p (symbol)
+           (string-match-p (format "^\\(\\(#:\\)\\|:\\)?%s$"
+                                   (regexp-quote symbol-name))
+                           symbol)))
+    (save-excursion
+      (block nil
+        (while (ignore-errors (slime-goto-next-export-clause) t)
+          (let ((clause-end (save-excursion (forward-sexp) (point))))
+            (when (and (search-forward symbol-name clause-end t)
+                       (target-symbol-p (slime-symbol-at-point)))
+              (return (point)))))))))
 
 (defun slime-frob-defpackage-form (current-package do-what symbol)
   "Adds/removes `symbol' from the DEFPACKAGE form of `current-package'





More information about the slime-cvs mailing list