[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Sun Oct 25 18:44:36 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv17818
Modified Files:
slime.el ChangeLog
Log Message:
Revert the reversed numbering of restarts in sldb.
New command `sldb-cycle' ([tab]) in sldb will cycle between
restart list and backtrace.
Make sldb-invoke-restart-by-name case-insensitive.
* slime.el (sldb-mode-map): Bind Tab to `sldb-cycle'.
(sldb-restart-list-start-marker): New variable.
(sldb-setup): Store marker in it.
(sldb-cycle): New command to cycle between restart list and
backtrace.
(sldb-invoke-restart-by-name): Make completion case-insensitive.
(sldb-insert-restarts): Revert to old behaviour.
--- /project/slime/cvsroot/slime/slime.el 2009/10/24 09:47:46 1.1235
+++ /project/slime/cvsroot/slime/slime.el 2009/10/25 18:44:35 1.1236
@@ -5385,7 +5385,10 @@
"Current debug level (recursion depth) displayed in buffer.")
(defvar sldb-backtrace-start-marker nil
- "Marker placed at the beginning of the backtrace text.")
+ "Marker placed at the first frame of the backtrace.")
+
+ (defvar sldb-restart-list-start-marker nil
+ "Marker placed at the first restart in the restart list.")
(defvar sldb-continuations nil
"List of ids for pending continuation."))
@@ -5463,13 +5466,15 @@
(set-keymap-parent sldb-mode-map slime-parent-map)
(slime-define-keys sldb-mode-map
- ("h" 'describe-mode)
- ("v" 'sldb-show-source)
+
((kbd "RET") 'sldb-default-action)
("\C-m" 'sldb-default-action)
([return] 'sldb-default-action)
([mouse-2] 'sldb-default-action/mouse)
([follow-link] 'mouse-face)
+ ("\C-i" 'sldb-cycle)
+ ("h" 'describe-mode)
+ ("v" 'sldb-show-source)
("e" 'sldb-eval-in-frame)
("d" 'sldb-pprint-eval-in-frame)
("D" 'sldb-disassemble)
@@ -5504,7 +5509,7 @@
(eval `(defun ,fname ()
,docstring
(interactive)
- (sldb-invoke-restart (- (length sldb-restarts) number 1))))
+ (sldb-invoke-restart ,number)))
(define-key sldb-mode-map (number-to-string number) fname)))
@@ -5569,7 +5574,8 @@
(setq sldb-restarts restarts)
(setq sldb-continuations conts)
(sldb-insert-condition condition)
- (insert "\n\n" (in-sldb-face section "Restarts:"))
+ (insert "\n\n" (in-sldb-face section "Restarts:") "\n")
+ (setq sldb-restart-list-start-marker (point-marker))
(sldb-insert-restarts restarts 0 sldb-initial-restart-limit)
(insert "\n" (in-sldb-face section "Backtrace:") "\n")
(setq sldb-backtrace-start-marker (point-marker))
@@ -5651,13 +5657,11 @@
(end (if count (min (+ start count) len) len)))
(loop for (name string) in (subseq restarts start end)
for number from start
- for i downfrom (- len start 1)
- do (unless (bolp) (insert "\n"))
- (slime-insert-propertized
+ do (slime-insert-propertized
`(, at nil restart ,number
sldb-default-action sldb-invoke-restart
mouse-face highlight)
- " " (in-sldb-face restart-number (number-to-string i))
+ " " (in-sldb-face restart-number (number-to-string number))
": [" (in-sldb-face restart-type name) "] "
(in-sldb-face restart string))
(insert "\n"))
@@ -5904,6 +5908,17 @@
(let ((fn (get-text-property (point) 'sldb-default-action)))
(if fn (funcall fn))))))
+(defun sldb-cycle ()
+ "Cycle between restart list and backtrace."
+ (interactive)
+ (let ((pt (point)))
+ (cond ((< pt sldb-restart-list-start-marker)
+ (goto-char sldb-restart-list-start-marker))
+ ((< pt sldb-backtrace-start-marker)
+ (goto-char sldb-backtrace-start-marker))
+ (t
+ (goto-char sldb-restart-list-start-marker)))))
+
(defun sldb-end-of-backtrace ()
"Fetch the entire backtrace and go to the last frame."
(interactive)
@@ -6164,10 +6179,10 @@
((:abort)))))
(defun sldb-invoke-restart-by-name (restart-name)
- (interactive (list (completing-read "Restart: "
- sldb-restarts nil t
- ""
- 'sldb-invoke-restart-by-name)))
+ (interactive (list (let ((completion-ignore-case t))
+ (completing-read "Restart: " sldb-restarts nil t
+ ""
+ 'sldb-invoke-restart-by-name))))
(sldb-invoke-restart (position restart-name sldb-restarts
:test 'string= :key 'first)))
--- /project/slime/cvsroot/slime/ChangeLog 2009/10/24 11:32:18 1.1887
+++ /project/slime/cvsroot/slime/ChangeLog 2009/10/25 18:44:35 1.1888
@@ -1,3 +1,20 @@
+2009-10-25 Tobias C. Rittweiler <tcr at freebits.de>
+
+ Revert the reversed numbering of restarts in sldb.
+
+ New command `sldb-cycle' ([tab]) in sldb will cycle between
+ restart list and backtrace.
+
+ Make sldb-invoke-restart-by-name case-insensitive.
+
+ * slime.el (sldb-mode-map): Bind Tab to `sldb-cycle'.
+ (sldb-restart-list-start-marker): New variable.
+ (sldb-setup): Store marker in it.
+ (sldb-cycle): New command to cycle between restart list and
+ backtrace.
+ (sldb-invoke-restart-by-name): Make completion case-insensitive.
+ (sldb-insert-restarts): Revert to old behaviour.
+
2009-10-24 Tobias C. Rittweiler <tcr at freebits.de>
* swank-ccl.lisp (who-specializes): Do not signal an error if
More information about the slime-cvs
mailing list