Skip to content
Snippets Groups Projects
Commit 907a68a9 authored by dtc's avatar dtc
Browse files

o Generate numbered restart commands even if the restart name is shadowed.

  From Pierre R. Mai.
parent fe6eee57
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/debug.lisp,v 1.50 2001/01/27 14:18:14 pw Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/debug.lisp,v 1.51 2001/01/28 12:54:08 dtc Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -1062,19 +1062,19 @@ See the CMU Common Lisp User's Manual for more information. ...@@ -1062,19 +1062,19 @@ See the CMU Common Lisp User's Manual for more information.
;;; ;;;
;;; Two commands are made for each restart: one for the number, and one for ;;; Two commands are made for each restart: one for the number, and one for
;;; the restart name (unless it's been shadowed by an earlier restart of the ;;; the restart name (unless it's been shadowed by an earlier restart of the
;;; same name. ;;; same name, or it is nil).
;;; ;;;
(defun make-restart-commands (&optional (restarts *debug-restarts*)) (defun make-restart-commands (&optional (restarts *debug-restarts*))
(let ((commands) (let ((commands)
(num 0)) ; better be the same as show-restarts! (num 0)) ; better be the same as show-restarts!
(dolist (restart restarts) (dolist (restart restarts)
(let ((name (string (restart-name restart)))) (let ((name (string (restart-name restart))))
(unless (find name commands :key #'car :test #'string=) (let ((restart-fun
(let ((restart-fun #'(lambda () (invoke-restart-interactively restart))))
#'(lambda () (push (cons (format nil "~d" num) restart-fun) commands)
(invoke-restart-interactively restart)))) (unless (or (null (restart-name restart))
(push (cons name restart-fun) commands) (find name commands :key #'car :test #'string=))
(push (cons (format nil "~d" num) restart-fun) commands)))) (push (cons name restart-fun) commands))))
(incf num)) (incf num))
commands)) commands))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment