-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I use the following snippet to add a slime-shortcut which works like
,l
but it makes possible to quickload both ASDF and Quicklisp systems.
It uses ido-completing-read
but it can be replaced by completing-read
without problem.
;;; Quickload a system
(defslime-repl-shortcut slime-repl-quickload
("quickload" "+ql" "ql")
(:handler (lambda ()
(interactive)
(let* ((system-names
(slime-eval '(cl:nunion
(swank:list-asdf-systems)
(cl:nunion
(cl:mapcar 'ql-dist:name
(ql:system-list))
(ql:list-local-systems)
:test 'cl:string=)
:test 'cl:string=)))
(default-value (slime-find-asd-file
(or default-directory
(buffer-file-name))
system-names))
(prompt (concat "System "
(if default-value
(format " (default `%s'): " default-value)
": ")))
(system (ido-completing-read prompt
(slime-bogus-completion-alist system-names)
nil nil nil
'slime-system-history
default-value)))
(insert "(ql:quickload :" system ")")
(slime-repl-send-input t))))
(:one-liner "Quickload a system"))
Metadata
Metadata
Assignees
Labels
No labels