[slime-cvs] CVS slime
CVS User nsiivola
nsiivola at common-lisp.net
Tue Jun 14 14:00:11 UTC 2011
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv13123
Modified Files:
ChangeLog slime.el
Log Message:
slime-indentation: remove stale system indentations
When updating common-lisp-system-indentation, remove
old indentation specs from packages which have a new one.
--- /project/slime/cvsroot/slime/ChangeLog 2011/06/10 16:13:28 1.2198
+++ /project/slime/cvsroot/slime/ChangeLog 2011/06/14 14:00:10 1.2199
@@ -1,3 +1,8 @@
+2011-06-14 Nikodemus Siivola <nikodemus at random-state.net>
+
+ * slime.el (slime-update-system-indentation): Remove stale specs
+ from common-lisp-system-indentation when new one arrives.
+
2011-06-10 Nikodemus Siivola <nikodemus at random-state.net>
* swank.lisp (macro-indentation): Walk the lambda-list
--- /project/slime/cvsroot/slime/slime.el 2011/06/09 16:35:09 1.1371
+++ /project/slime/cvsroot/slime/slime.el 2011/06/14 14:00:10 1.1372
@@ -6933,19 +6933,24 @@
spec)))
(defun slime-update-system-indentation (symbol indent packages)
- (let ((list (gethash symbol common-lisp-system-indentation)))
+ (let ((list (gethash symbol common-lisp-system-indentation))
+ (ok nil))
(if (not list)
(puthash symbol (list (cons indent packages))
common-lisp-system-indentation)
- (or (dolist (spec list)
- (when (equal (car spec) indent)
- (dolist (p packages)
- (unless (member p (cdr spec))
- (push p (cdr spec))))
- (return t)))
- (puthash symbol (cons (cons indent packages)
- list)
- 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)))))
(defun slime-handle-indentation-update (alist)
"Update Lisp indent information.
More information about the slime-cvs
mailing list