Skip to content
Snippets Groups Projects
Commit 312b12ed authored by ram's avatar ram
Browse files

Changed to use DESTRUCTING-BIND instead of WITH-KEYWORDS, so we get some error

checking, and stop using that old crock.
parent ee5e31d9
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/ntrace.lisp,v 1.2 1991/11/03 17:21:16 chiles Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/ntrace.lisp,v 1.3 1991/11/15 14:52:27 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -47,31 +47,6 @@ ...@@ -47,31 +47,6 @@
"This is currently unused.") "This is currently unused.")
;;;; TRACE.
(eval-when (compile eval)
;;; WITH-KEYWORDS -- Internal.
;;;
;;; This takes an options list of the following form:
;;; (<option-name> <value> ...)
;;; It also takes a keyword binding spec of the following form:
;;; ((<keyword> <binding-var> <default>)
;;; ...)
;;; This returns a form that binds the variables to any provided value in
;;; options-list or to the default.
;;;
(defmacro with-keywords (option-list key-list &rest body)
`(let ,(mapcar #'(lambda (kl)
`(,(cadr kl) ;var
(or (getf ,option-list ,(car kl))
,(caddr kl)))) ;default
key-list)
,@body))
) ;EVAL-WHEN
;;; TRACE -- Public. ;;; TRACE -- Public.
;;; ;;;
(defmacro trace (&rest specs) (defmacro trace (&rest specs)
...@@ -132,15 +107,9 @@ ...@@ -132,15 +107,9 @@
(t (error "Illegal function name: ~S." fun))))) (t (error "Illegal function name: ~S." fun)))))
(t (error "Illegal trace spec: ~S." spec))) (t (error "Illegal trace spec: ~S." spec)))
(push name name-list) (push name name-list)
(with-keywords options (destructuring-bind (&key condition break break-after break-all
((:condition condition nil) wherein print print-after print-all)
(:break break nil) options
(:break-after break-after nil)
(:break-all break-all nil)
(:wherein wherein nil)
(:print print nil)
(:print-after print-after nil)
(:print-all print-all nil))
(when break-all (when break-all
(setf break (setf break-after break-all))) (setf break (setf break-after break-all)))
(when print-all (when print-all
......
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