Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
marvel
GitHub Repository: marvel/qnf
Path: blob/master/elisp/slime/contrib/slime-sbcl-exts.el
990 views
1
2
(define-slime-contrib slime-sbcl-exts
3
"Misc extensions for SBCL"
4
(:authors "Tobias C. Rittweiler <[email protected]>")
5
(:license "GPL")
6
(:slime-dependencies slime-references)
7
(:swank-dependencies swank-sbcl-exts))
8
9
(defun slime-sbcl-bug-at-point ()
10
(save-excursion
11
(save-match-data
12
(unless (looking-at "#[0-9]\\{6\\}")
13
(search-backward-regexp "#\\<" (line-beginning-position) t))
14
(when (looking-at "#[0-9]\\{6\\}")
15
(buffer-substring-no-properties (match-beginning 0) (match-end 0))))))
16
17
(defun slime-read-sbcl-bug (prompt &optional query)
18
"Either read a sbcl bug or choose the one at point.
19
The user is prompted if a prefix argument is in effect, if there is no
20
symbol at point, or if QUERY is non-nil."
21
(let ((bug (slime-sbcl-bug-at-point)))
22
(cond ((or current-prefix-arg query (not bug))
23
(slime-read-from-minibuffer prompt bug))
24
(t bug))))
25
26
(defun slime-visit-sbcl-bug (bug)
27
"Visit the Launchpad site that describes `bug' (#nnnnnn)."
28
(interactive (list (slime-read-sbcl-bug "Bug number (#nnnnnn): ")))
29
(browse-url (format "http://bugs.launchpad.net/sbcl/+bug/%s"
30
(substring bug 1))))
31
32
(provide 'slime-sbcl-exts)
33
34