summaryrefslogtreecommitdiff
path: root/vim/bundle/slimv/slime/contrib/swank-hyperdoc.lisp
blob: 1e34a1d03387fdae0b1bde64d463e46aaf8b298e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(in-package :swank)

(defslimefun hyperdoc (string)
  (let ((hyperdoc-package (find-package :hyperdoc)))
    (when hyperdoc-package
      (multiple-value-bind (symbol foundp symbol-name package)
          (parse-symbol string *buffer-package*)
        (declare (ignore symbol))
        (when foundp
          (funcall (find-symbol (string :lookup) hyperdoc-package)
                   (package-name (if (member package (cons *buffer-package*
                                                           (package-use-list
                                                            *buffer-package*)))
                                     *buffer-package*
                                     package))
                   symbol-name))))))

(provide :swank-hyperdoc)