[noctool-cvs] CVS source

imattsson imattsson at common-lisp.net
Thu May 22 06:07:17 UTC 2008


Update of /project/noctool/cvsroot/source
In directory clnet:/tmp/cvs-serv5649

Modified Files:
	config.lisp 
Log Message:
IM

Modified DEFNESTED to make nested config macros to work in multiple
contexts.


--- /project/noctool/cvsroot/source/config.lisp	2008/05/18 11:03:14	1.5
+++ /project/noctool/cvsroot/source/config.lisp	2008/05/22 06:07:17	1.6
@@ -34,10 +34,13 @@
           collect (macroexpand-1 form))))
 
 (defmacro defnested (name args nesting &body clauses)
+  (let ((nesting-test (cond ((symbolp nesting) `(member ,nesting *macro-nesting*))
+			    (t (cons 'cl:or (loop for sym in nesting
+						  collect `(member ,sym *macro-nesting*)))))))
   `(defmacro ,name ,args
-     (unless (member ,nesting *macro-nesting*)
+     (unless ,nesting-test
        (error ,(format nil "Macro ~a must be nested" name)))
-     , at clauses))
+     , at clauses)))
 
 (defun choose-password (this remote)
   (if this
@@ -105,7 +108,7 @@
 		       (max-rtt 20) (max-fail 1) (ping-count 5)
 		       (interval 60))
     :machine
-  (list max-rtt max-fail interval)
+  (list max-rtt max-fail interval ping-count)
   `(noctool::make-monitor 'ping-monitor ,*config-object* , at args))
 
 (defmacro defmon (mon-class)




More information about the noctool-cvs mailing list