Klimi's new dotfiles with stow.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

31 rader
1.1 KiB

4 år sedan
  1. (require 'slime)
  2. (require 'slime-cl-indent)
  3. (require 'cl-lib)
  4. (define-slime-contrib slime-indentation
  5. "Contrib interfacing `slime-cl-indent' and SLIME."
  6. (:swank-dependencies swank-indentation)
  7. (:on-load
  8. (setq common-lisp-current-package-function 'slime-current-package)))
  9. (defun slime-update-system-indentation (symbol indent packages)
  10. (let ((list (gethash symbol common-lisp-system-indentation))
  11. (ok nil))
  12. (if (not list)
  13. (puthash symbol (list (cons indent packages))
  14. common-lisp-system-indentation)
  15. (dolist (spec list)
  16. (cond ((equal (car spec) indent)
  17. (dolist (p packages)
  18. (unless (member p (cdr spec))
  19. (push p (cdr spec))))
  20. (setf ok t))
  21. (t
  22. (setf (cdr spec)
  23. (cl-set-difference (cdr spec) packages :test 'equal)))))
  24. (unless ok
  25. (puthash symbol (cons (cons indent packages)
  26. list)
  27. common-lisp-system-indentation)))))
  28. (provide 'slime-indentation)