[slime-cvs] CVS slime

heller heller at common-lisp.net
Mon Feb 4 16:36:29 UTC 2008


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

Modified Files:
	slime.el ChangeLog 
Log Message:
Simpler code to bind 0-9 in the debugger.

* slime.el (sldb-mode-map): When binding the keys 0-9, use eval
instead of two macros.


--- /project/slime/cvsroot/slime/slime.el	2008/02/03 18:51:56	1.897
+++ /project/slime/cvsroot/slime/slime.el	2008/02/04 16:36:28	1.898
@@ -6574,30 +6574,14 @@
         (define-key sldb-mode-map key command)))))
 
 ;; Keys 0-9 are shortcuts to invoke particular restarts.
-(defmacro define-sldb-invoke-restart-key (number key)
+(dotimes (number 10)
   (let ((fname (intern (format "sldb-invoke-restart-%S" number)))
         (docstring (format "Invoke restart numbered %S." number)))
-    `(progn
-       (defun ,fname ()
-         ,docstring
-	 (interactive)
-	 (sldb-invoke-restart ,number))
-       (define-key sldb-mode-map ,key ',fname))))
-
-(defmacro define-sldb-invoke-restart-keys (from to)
-  `(progn
-     ,@(loop for n from from to to
-	     collect `(define-sldb-invoke-restart-key ,n
-			,(number-to-string n)))))
-
-(define-sldb-invoke-restart-keys 0 9)
-
-(defun sldb-invoke-restart-by-name (restart-name)
-  (interactive (list (completing-read "Restart: "
-                                      sldb-restarts nil t
-                                      ""
-                                      'sldb-invoke-restart-by-name)))
-  (sldb-invoke-restart (position restart-name sldb-restarts :test 'string= :key 'first)))
+    (eval `(defun ,fname ()
+             ,docstring
+             (interactive)
+             (sldb-invoke-restart ,number)))
+    (define-key sldb-mode-map (number-to-string number) fname)))
 
 
 ;;;;; SLDB buffer creation & update
@@ -7231,6 +7215,14 @@
       ((:ok value) (message "Restart returned: %s" value))
       ((:abort)))))
 
+(defun sldb-invoke-restart-by-name (restart-name)
+  (interactive (list (completing-read "Restart: "
+                                      sldb-restarts nil t
+                                      ""
+                                      'sldb-invoke-restart-by-name)))
+  (sldb-invoke-restart (position restart-name sldb-restarts 
+                                 :test 'string= :key 'first)))
+
 (defun sldb-break-with-default-debugger ()
   "Enter default debugger."
   (interactive)
--- /project/slime/cvsroot/slime/ChangeLog	2008/02/04 16:25:10	1.1278
+++ /project/slime/cvsroot/slime/ChangeLog	2008/02/04 16:36:28	1.1279
@@ -1,3 +1,19 @@
+2008-02-04  Helmut Eller  <heller at common-lisp.net>
+
+	Simpler code to bind 0-9 in the debugger.
+
+	* slime.el (sldb-mode-map): When binding the keys 0-9, use eval
+	instead of two macros.
+
+2008-02-04  Helmut Eller  <heller at common-lisp.net>
+
+	Move some functions to swank-arglist.lisp.
+
+	* swank.lisp (length=, ensure-list, recursively-empty-p)
+	(maybecall, exactly-one-p, read-softly-from-string)
+	(unintern-in-home-package, valid-function-name-p): Moved to
+	contrib/swank-arglist.lisp.
+
 2008-02-03  Marco Baringer  <mb at bese.it>
 
 	* swank.lisp (*sldb-condition-printer*): New variable.
@@ -21,7 +37,7 @@
 2008-01-27  Helmut Eller  <heller at common-lisp.net>
 
 	Make it easier to start a non-default Lisp from ELisp code.
-	
+
 	* slime.el (slime): If the argument is a symbol start the
 	corresponding entry in slime-lisp-implementations.
 	Typical use is something like:
@@ -35,7 +51,7 @@
 	(suppress-sharp-dot): unused, delete it.
 
 	* slime.el (test compile-defun): test with #+#.'(:and).
-	
+
 2008-01-21  Helmut Eller  <heller at common-lisp.net>
 
 	* slime.el (sldb-mode): Don't throw to toplevel in the




More information about the slime-cvs mailing list