[slime-cvs] CVS slime/contrib

CVS User sboukarev sboukarev at common-lisp.net
Thu May 26 00:27:14 UTC 2011


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

Modified Files:
	ChangeLog slime-package-fu.el 
Log Message:
* slime-package-fu.el (slime-add-export): Add :export to the end
of a defpackage form when there's no :export present.


--- /project/slime/cvsroot/slime/contrib/ChangeLog	2011/05/21 17:01:48	1.460
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2011/05/26 00:27:14	1.461
@@ -1,3 +1,8 @@
+2011-05-26  Stas Boukarev  <stassats at gmail.com>
+
+	* slime-package-fu.el (slime-add-export): Add :export to the end
+	of a defpackage form when there's no :export present. 
+
 2011-05-21  Helmut Eller  <heller at common-lisp.net>
 
 	* slime-snapshot.el: License is GPL.
--- /project/slime/cvsroot/slime/contrib/slime-package-fu.el	2010/07/24 23:39:24	1.12
+++ /project/slime/cvsroot/slime/contrib/slime-package-fu.el	2011/05/26 00:27:14	1.13
@@ -180,17 +180,20 @@
       number-of-actions)))
 
 (defun slime-add-export ()
-    (let (point)
-      (save-excursion
-        (while (ignore-errors (slime-goto-next-export-clause) t)
-          (setq point (point))))
-      (cond (point
-             (goto-char point)
-             (down-list)
-             (slime-end-of-list))
-            (t
-             (insert "(:export ")
-             (save-excursion (insert ")"))))))
+  (let (point)
+    (save-excursion
+      (while (ignore-errors (slime-goto-next-export-clause) t)
+        (setq point (point))))
+    (cond (point
+           (goto-char point)
+           (down-list)
+           (slime-end-of-list))
+          (t
+           (slime-end-of-list)
+           (unless (looking-back "^\\s-*")
+             (newline-and-indent))
+           (insert "(:export ")
+           (save-excursion (insert ")"))))))
 
 (defun slime-insert-export (symbol-name)
   ;; Assumes we're at the inside :export after the last symbol





More information about the slime-cvs mailing list