Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 rivejä
1.2 KiB

5 vuotta sitten
  1. (require 'slime)
  2. (require 'cl-lib)
  3. (define-slime-contrib slime-sbcl-exts
  4. "Misc extensions for SBCL"
  5. (:authors "Tobias C. Rittweiler <tcr@freebits.de>")
  6. (:license "GPL")
  7. (:slime-dependencies slime-references)
  8. (:swank-dependencies swank-sbcl-exts))
  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. (defun slime-read-sbcl-bug (prompt &optional query)
  17. "Either read a sbcl bug or choose the one at point.
  18. The user is prompted if a prefix argument is in effect, if there is no
  19. symbol at point, or if QUERY is non-nil."
  20. (let ((bug (slime-sbcl-bug-at-point)))
  21. (cond ((or current-prefix-arg query (not bug))
  22. (slime-read-from-minibuffer prompt bug))
  23. (t bug))))
  24. (defun slime-visit-sbcl-bug (bug)
  25. "Visit the Launchpad site that describes `bug' (#nnnnnn)."
  26. (interactive (list (slime-read-sbcl-bug "Bug number (#nnnnnn): ")))
  27. (browse-url (format "http://bugs.launchpad.net/sbcl/+bug/%s"
  28. (substring bug 1))))
  29. (provide 'slime-sbcl-exts)