[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Sat Oct 24 08:00:28 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv19163
Modified Files:
ChangeLog slime.el
Log Message:
* slime.el (sldb-insert-restarts): Insert the proper numbers for
the --more-- button.
(sldb-restart-number-at-point): Rename back to
sldb-restart-at-point. Don't use
confisingly-verbose-names-for-no-good-reason.
(sldb-restart-number-for-swank): Deleted.
--- /project/slime/cvsroot/slime/ChangeLog 2009/10/23 19:40:14 1.1882
+++ /project/slime/cvsroot/slime/ChangeLog 2009/10/24 08:00:28 1.1883
@@ -1,3 +1,12 @@
+2009-10-24 Helmut Eller <heller at common-lisp.net>
+
+ * slime.el (sldb-insert-restarts): Insert the proper numbers for
+ the --more-- button.
+ (sldb-restart-number-at-point): Rename back to
+ sldb-restart-at-point. Don't use
+ confisingly-verbose-names-for-no-good-reason.
+ (sldb-restart-number-for-swank): Deleted.
+
2009-10-23 Tobias C. Rittweiler <tcr at freebits.de>
Restarts in SLDB are now numbered reversely. The rationale is that
--- /project/slime/cvsroot/slime/slime.el 2009/10/23 19:40:14 1.1232
+++ /project/slime/cvsroot/slime/slime.el 2009/10/24 08:00:28 1.1233
@@ -5485,7 +5485,7 @@
(eval `(defun ,fname ()
,docstring
(interactive)
- (sldb-invoke-restart (sldb-restart-number-for-swank ,number))))
+ (sldb-invoke-restart (- (length sldb-restarts) number 1))))
(define-key sldb-mode-map (number-to-string number) fname)))
@@ -5630,17 +5630,15 @@
RESTARTS should be a list ((NAME DESCRIPTION) ...)."
(let* ((len (length restarts))
(end (if count (min (+ start count) len) len)))
- ;; N.B. We deliberately number the restarts reversely so always
- ;; existing restarts (e.g. SWANK's RETRY restart) will likely get
- ;; the same numeric value.
(loop for (name string) in (subseq restarts start end)
- for number from (1- len) downto start
+ for number from start
+ for i downfrom (- len start 1)
do (unless (bolp) (insert "\n"))
(slime-insert-propertized
- `(, at nil sldb-restart-number ,number
+ `(, at nil restart ,number
sldb-default-action sldb-invoke-restart
mouse-face highlight)
- " " (in-sldb-face restart-number (number-to-string number))
+ " " (in-sldb-face restart-number (number-to-string i))
": [" (in-sldb-face restart-type name) "] "
(in-sldb-face restart string))
(insert "\n"))
@@ -5657,10 +5655,6 @@
(delete-region position (1+ (line-end-position)))
(sldb-insert-restarts restarts start nil)))
-;;; Fix up the reverse ordering. Cf. `sldb-insert-restarts'.
-(defun sldb-restart-number-for-swank (restart-number)
- (- (length sldb-restarts) (1+ restart-number)))
-
(defun sldb-frame.string (frame)
(destructuring-bind (_ str &optional _) frame str))
@@ -5739,11 +5733,9 @@
;;;;;; SLDB examining text props
-(defun sldb-restart-number-at-point ()
- (let ((n (get-text-property (point) 'sldb-restart-number)))
- (unless n
- (error "No restart at point"))
- (sldb-restart-number-for-swank n)))
+(defun sldb-restart-at-point ()
+ (or (get-text-property (point) 'restart)
+ (error "No restart at point")))
(defun sldb-frame-number-at-point ()
(let ((frame (get-text-property (point) 'frame)))
@@ -6141,7 +6133,7 @@
Optional NUMBER (index into `sldb-restarts') specifies the
restart to invoke, otherwise use the restart at point."
(interactive)
- (let ((restart (or number (sldb-restart-number-at-point))))
+ (let ((restart (or number (sldb-restart-at-point))))
(slime-rex ()
((list 'swank:invoke-nth-restart-for-emacs sldb-level restart))
((:ok value) (message "Restart returned: %s" value))
More information about the slime-cvs
mailing list