[slime-cvs] CVS slime

trittweiler trittweiler at common-lisp.net
Thu Aug 14 11:46:40 UTC 2008


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv32536

Modified Files:
	slime.el ChangeLog 
Log Message:
	Xref buffers: `M-,' in an Xref buffer will now revert to an Emacs
	state as of before the Xref command.

	* slime.el (slime-xref-mode-map): Add `slime-xref-retract' as `M-,'
	(slime-xref-retract): New. Restores the emacs snapshot unconditionally.
	(slime-xref-quit): Use it.


--- /project/slime/cvsroot/slime/slime.el	2008/08/14 11:10:00	1.993
+++ /project/slime/cvsroot/slime/slime.el	2008/08/14 11:46:38	1.994
@@ -6071,7 +6071,8 @@
   ("n" 'slime-next-line/not-add-newlines)
   ("p" 'previous-line)
   ("\C-c\C-c" 'slime-recompile-xref)
-  ("\C-c\C-k" 'slime-recompile-all-xrefs))
+  ("\C-c\C-k" 'slime-recompile-all-xrefs)
+  ("\M-," 'slime-xref-retract))
 
 (defun slime-next-line/not-add-newlines ()
   (interactive)
@@ -6103,19 +6104,15 @@
                (buffer-list))
       (error "No XREF buffer")))
 
-(defun slime-xref-saved-snapshot ()
-  (let ((snapshot ))
-    (assert snapshot)
-    snaptshot))
-
 (defun slime-xref-quit (&optional _)
-  "Kill the current xref buffer and restore the window configuration."
+  "Kill the current xref buffer, restore the window configuration
+if appropriate."
   (interactive)
   (slime-xref-cleanup)
   ;; We can't simply use `slime-popup-buffer-quit' because we also
   ;; want the Xref window be deleted.
   (if (slime-popup-buffer-snapshot-unchanged-p)
-      (slime-popup-buffer-restore-snapshot)
+      (slime-xref-retract)
     (let ((snapshot slime-popup-buffer-saved-emacs-snapshot)
           (buffer   (current-buffer)))
       ;; Make M-, work after Xref'ing.
@@ -6123,11 +6120,20 @@
       (delete-windows-on buffer)
       (kill-buffer buffer))))
 
+(defun slime-xref-retract ()
+  "Leave the Xref buffer, and make everything as of before."
+  (interactive)
+  (slime-xref-cleanup)
+  (let ((buffer (current-buffer)))
+    (slime-popup-buffer-restore-snapshot)
+    (kill-buffer buffer)))
+
 (defun slime-xref-cleanup ()
   "Delete overlays created by xref mode and kill the xref buffer."
   (sldb-delete-overlays))
 
 
+
 (defun slime-insert-xrefs (xref-alist)
   "Insert XREF-ALIST in the current-buffer.
 XREF-ALIST is of the form ((GROUP . ((LABEL LOCATION) ...)) ...).
--- /project/slime/cvsroot/slime/ChangeLog	2008/08/14 11:10:00	1.1450
+++ /project/slime/cvsroot/slime/ChangeLog	2008/08/14 11:46:39	1.1451
@@ -1,5 +1,14 @@
 2008-08-14  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	Xref buffers: `M-,' in an Xref buffer will now revert to an Emacs
+	state as of before the Xref command.
+
+	* slime.el (slime-xref-mode-map): Add `slime-xref-retract' as `M-,'
+	(slime-xref-retract): New. Restores the emacs snapshot unconditionally.
+	(slime-xref-quit): Use it.
+
+2008-08-14  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	Xref buffers: `q', and `SPC' will push onto the find-definition
 	stack such that M-, will work afterwards.
 




More information about the slime-cvs mailing list