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

Luke Gorrie lgorrie at common-lisp.net
Fri Mar 19 21:04:29 UTC 2004


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

Modified Files:
	slime.el 
Log Message:
(slime-connected-hook): New hook called each time SLIME successfully
connects to Lisp. This is handy for calling
`slime-ensure-typeout-frame', if you want to use that feature.

(sldb-print-condition): New command to print the SLDB condition
description into the REPL, for reference after SLDB exits. Can be
called from `sldb-hook' if you want the condition to always be
printed. Bound to 'P' in SLDB.

Date: Fri Mar 19 16:04:28 2004
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.237 slime/slime.el:1.238
--- slime/slime.el:1.237	Thu Mar 18 16:14:12 2004
+++ slime/slime.el	Fri Mar 19 16:04:28 2004
@@ -269,6 +269,11 @@
   :type 'function
   :options '(slime-complete-symbol* slime-simple-complete-symbol))
   
+(defcustom slime-connected-hook nil
+  "List of functions to call when SLIME connects to Lisp."
+  :group 'slime
+  :type 'hook)
+  
 
 ;;; Minor modes
 
@@ -1065,6 +1070,7 @@
       (delete-windows-on buffer)
       (bury-buffer buffer))
     (slime-init-output-buffer process)
+    (run-hooks 'slime-connected-hook)
     (message "Connected to Swank server on port %S. %s"
              port (slime-random-words-of-encouragement))))
 
@@ -4221,7 +4227,7 @@
 
 (make-variable-buffer-local
  (defvar sldb-condition nil
-   "String describing the condition being debugged."))
+   "List of (DESCRIPTION TYPE) strings describing the condition being debugged."))
 
 (make-variable-buffer-local
  (defvar sldb-restarts nil
@@ -4332,6 +4338,7 @@
   ("a"    'sldb-abort)
   ("q"    'sldb-quit)
   ("B"    'sldb-break-with-default-debugger)
+  ("P"    'sldb-print-condition)
   (":"    'slime-interactive-eval))
 
 ;; Inherit bindings from slime-mode
@@ -4813,6 +4820,16 @@
         ((list 'swank:restart-frame number))
       ((:ok value) (message "%s" value))
       ((:abort)))))
+
+(defun sldb-print-condition ()
+  "Print the condition SLDB is handling in the REPL.
+This way you can still see what the error was after exiting SLDB."
+  (interactive)
+  (when (null sldb-condition)
+    (error "No condition known (wrong buffer?)"))
+  (slime-output-string (format "%s\n%s\n"
+                               (first sldb-condition)
+                               (second sldb-condition))))
 
 
 ;;; Thread control panel





More information about the slime-cvs mailing list