[slime-cvs] CVS slime
heller
heller at common-lisp.net
Fri Aug 24 14:47:11 UTC 2007
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv21494
Modified Files:
slime.el ChangeLog
Log Message:
Move xref broser to contrib.
--- /project/slime/cvsroot/slime/slime.el 2007/08/24 13:55:52 1.809
+++ /project/slime/cvsroot/slime/slime.el 2007/08/24 14:47:11 1.810
@@ -8914,96 +8914,6 @@
("\M-." 'slime-edit-definition))
-;;;; classes browser
-
-(defun slime-expand-class-node (widget)
- (or (widget-get widget :args)
- (let ((name (widget-get widget :tag)))
- (loop for kid in (slime-eval `(swank:mop :subclasses ,name))
- collect `(tree-widget :tag ,kid
- :dynargs slime-expand-class-node
- :has-children t)))))
-
-(defun slime-browse-classes (name)
- "Read the name of a class and show its subclasses."
- (interactive (list (slime-read-symbol-name "Class Name: ")))
- (slime-call-with-browser-setup
- "*slime class browser*" (slime-current-package) "Class Browser"
- (lambda ()
- (widget-create 'tree-widget :tag name
- :dynargs 'slime-expand-class-node
- :has-echildren t))))
-
-(defvar slime-browser-map nil
- "Keymap for tree widget browsers")
-
-(require 'tree-widget)
-(unless slime-browser-map
- (setq slime-browser-map (make-sparse-keymap))
- (set-keymap-parent slime-browser-map widget-keymap)
- (define-key slime-browser-map "q" 'bury-buffer))
-
-(defun slime-call-with-browser-setup (buffer package title fn)
- (switch-to-buffer buffer)
- (kill-all-local-variables)
- (setq slime-buffer-package package)
- (let ((inhibit-read-only t)) (erase-buffer))
- (widget-insert title "\n\n")
- (save-excursion
- (funcall fn))
- (lisp-mode-variables t)
- (slime-mode t)
- (use-local-map slime-browser-map)
- (widget-setup))
-
-
-;;;; Xref browser
-
-(defun slime-fetch-browsable-xrefs (type name)
- "Return a list ((LABEL DSPEC)).
-LABEL is just a string for display purposes.
-DSPEC can be used to expand the node."
- (let ((xrefs '()))
- (loop for (_file . specs) in (slime-eval `(swank:xref ,type ,name)) do
- (loop for (dspec . _location) in specs do
- (let ((exp (ignore-errors (read (downcase dspec)))))
- (cond ((and (consp exp) (eq 'flet (car exp)))
- ;; we can't expand FLET references so they're useless
- )
- ((and (consp exp) (eq 'method (car exp)))
- ;; this isn't quite right, but good enough for now
- (push (list dspec (string (second exp))) xrefs))
- (t
- (push (list dspec dspec) xrefs))))))
- xrefs))
-
-(defun slime-expand-xrefs (widget)
- (or (widget-get widget :args)
- (let* ((type (widget-get widget :xref-type))
- (dspec (widget-get widget :xref-dspec))
- (xrefs (slime-fetch-browsable-xrefs type dspec)))
- (loop for (label dspec) in xrefs
- collect `(tree-widget :tag ,label
- :xref-type ,type
- :xref-dspec ,dspec
- :dynargs slime-expand-xrefs
- :has-children t)))))
-
-(defun slime-browse-xrefs (name type)
- "Show the xref graph of a function in a tree widget."
- (interactive
- (list (slime-read-from-minibuffer "Name: "
- (slime-symbol-name-at-point))
- (read (completing-read "Type: " (slime-bogus-completion-alist
- '(":callers" ":callees" ":calls"))
- nil t ":"))))
- (slime-call-with-browser-setup
- "*slime xref browser*" (slime-current-package) "Xref Browser"
- (lambda ()
- (widget-create 'tree-widget :tag name :xref-type type :xref-dspec name
- :dynargs 'slime-expand-xrefs :has-echildren t))))
-
-
;;;; Buffer selector
(defvar slime-selector-methods nil
--- /project/slime/cvsroot/slime/ChangeLog 2007/08/24 13:59:25 1.1159
+++ /project/slime/cvsroot/slime/ChangeLog 2007/08/24 14:47:11 1.1160
@@ -1,3 +1,10 @@
+2007-08-24 Helmut Eller <heller at common-lisp.net>
+
+ Move xref and class browser to contrib.
+
+ * slime.el (slime-browse-classes, slime-browse-xrefs): Gone. The
+ Common Lisp part is still there.
+
2007-08-24 Tobias C. Rittweiler <tcr at freebits.de>
* slime.el (slime-forward-blanks): Wrapped w/ `ignore-errors.'
More information about the slime-cvs
mailing list