/[slime]/slime/contrib/slime-indentation.el
ViewVC logotype

Contents of /slime/contrib/slime-indentation.el

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations)
Wed Dec 7 18:02:16 2011 UTC (2 years, 4 months ago) by heller
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +20 -0 lines
* slime.el (slime-update-system-indentation): Moved to
contrib/slime-indentation.el.
1
2 (define-slime-contrib slime-indentation
3 "Patched version of cl-indent.el as a slime-contrib module"
4 (:swank-dependencies swank-indentation))
5
6 (load "slime-cl-indent.el")
7
8 (setq common-lisp-current-package-function 'slime-current-package)
9
10 (defun slime-update-system-indentation (symbol indent packages)
11 (let ((list (gethash symbol common-lisp-system-indentation))
12 (ok nil))
13 (if (not list)
14 (puthash symbol (list (cons indent packages))
15 common-lisp-system-indentation)
16 (dolist (spec list)
17 (cond ((equal (car spec) indent)
18 (dolist (p packages)
19 (unless (member p (cdr spec))
20 (push p (cdr spec))))
21 (setf ok t))
22 (t
23 (setf (cdr spec)
24 (set-difference (cdr spec) packages :test 'equal)))))
25 (unless ok
26 (puthash symbol (cons (cons indent packages)
27 list)
28 common-lisp-system-indentation)))))
29
30 (provide 'slime-indentation)

  ViewVC Help
Powered by ViewVC 1.1.5