[slime-cvs] CVS update: slime/ChangeLog slime/slime.el

Dan Barlow dbarlow at common-lisp.net
Tue Dec 2 01:33:15 UTC 2003


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv30106

Modified Files:
	ChangeLog slime.el 
Log Message:
	* slime.el (slime-with-xref-buffer): moved further up the file so
	it's defined before slime-show-xrefs needs it


Date: Mon Dec  1 20:33:15 2003
Author: dbarlow

Index: slime/ChangeLog
diff -u slime/ChangeLog:1.130 slime/ChangeLog:1.131
--- slime/ChangeLog:1.130	Mon Dec  1 19:56:39 2003
+++ slime/ChangeLog	Mon Dec  1 20:33:14 2003
@@ -1,5 +1,8 @@
 2003-12-02  Daniel Barlow  <dan at telent.net>
 
+	* slime.el (slime-with-xref-buffer): moved further up the file so
+	it's defined before slime-show-xrefs needs it
+
 	* swank-sbcl.lisp (function-source-location-for-emacs): return a
 	list of source locations (one per method) when the request is
 	for a GF.  This seems to make the elisp side popup a window


Index: slime/slime.el
diff -u slime/slime.el:1.123 slime/slime.el:1.124
--- slime/slime.el:1.123	Mon Dec  1 17:15:02 2003
+++ slime/slime.el	Mon Dec  1 20:33:14 2003
@@ -2997,6 +2997,25 @@
      (lambda (result)
        (slime-show-xrefs result type symbol package)))))
 
+(defmacro* slime-with-xref-buffer ((package ref-type symbol) &body body)
+  "Execute BODY in a xref buffer, then show that buffer."
+  (let ((type (gensym))
+        (sym (gensym)))
+    `(let ((,type ,ref-type)
+           (,sym ,symbol))
+       (with-current-buffer (get-buffer-create 
+                             (format "*XREF[%s: %s]*" ,type ,sym))
+         (prog2 (progn
+                  (slime-init-xref-buffer ,package ,type ,sym)
+                  (make-local-variable 'slime-xref-saved-window-configuration)
+                  (setq slime-xref-saved-window-configuration
+                        ,(current-window-configuration)))
+             (progn , at body)
+           (setq buffer-read-only t)
+           (select-window (or (get-buffer-window (current-buffer) t)
+                              (display-buffer (current-buffer) t)))
+           (shrink-window-if-larger-than-buffer))))))
+
 (defun slime-show-xrefs (xrefs type symbol package)
   "Show the results of an XREF query."
   (if (null xrefs)
@@ -3041,26 +3060,7 @@
   (setq slime-buffer-package package)
   (slime-set-truncate-lines))
 
-(defmacro* slime-with-xref-buffer ((package ref-type symbol) &body body)
-  "(slime-with-xref-buffer (package ref-type symbol) &body body)
 
-Execute BODY in a xref buffer, then show that buffer."
-  (let ((type (gensym))
-        (sym (gensym)))
-    `(let ((,type ,ref-type)
-           (,sym ,symbol))
-       (with-current-buffer (get-buffer-create 
-                             (format "*XREF[%s: %s]*" ,type ,sym))
-         (prog2 (progn
-                  (slime-init-xref-buffer ,package ,type ,sym)
-                  (make-local-variable 'slime-xref-saved-window-configuration)
-                  (setq slime-xref-saved-window-configuration
-                        ,(current-window-configuration)))
-             (progn , at body)
-           (setq buffer-read-only t)
-           (select-window (or (get-buffer-window (current-buffer) t)
-                              (display-buffer (current-buffer) t)))
-           (shrink-window-if-larger-than-buffer))))))
 
 (put 'slime-with-xref-buffer 'lisp-indent-function 1)
 





More information about the slime-cvs mailing list