[slime-cvs] CVS slime/contrib

CVS User heller heller at common-lisp.net
Wed Dec 7 18:02:17 UTC 2011


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

Modified Files:
	slime-indentation.el 
Log Message:
* slime.el (slime-update-system-indentation): Moved to
contrib/slime-indentation.el.

--- /project/slime/cvsroot/slime/contrib/slime-indentation.el	2011/06/09 16:35:09	1.8
+++ /project/slime/cvsroot/slime/contrib/slime-indentation.el	2011/12/07 18:02:16	1.9
@@ -7,4 +7,24 @@
 
 (setq common-lisp-current-package-function 'slime-current-package)
 
+(defun slime-update-system-indentation (symbol indent packages)
+  (let ((list (gethash symbol common-lisp-system-indentation))
+        (ok nil))
+    (if (not list)
+        (puthash symbol (list (cons indent packages))
+                 common-lisp-system-indentation)
+      (dolist (spec list)
+        (cond ((equal (car spec) indent)
+               (dolist (p packages)
+                 (unless (member p (cdr spec))
+                   (push p (cdr spec))))
+               (setf ok t))
+              (t
+               (setf (cdr spec)
+                     (set-difference (cdr spec) packages :test 'equal)))))
+      (unless ok
+        (puthash symbol (cons (cons indent packages)
+                              list)
+                 common-lisp-system-indentation)))))
+
 (provide 'slime-indentation)





More information about the slime-cvs mailing list