Commit 8d4bd257 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Don't offer help with non-existent parameters

parent fd67500c
;; Global/local parameters to pass to functions
;; Liam Healy 2013-02-16 20:51:14HST variable-metadata.lisp
;; Time-stamp: <2013-05-28 23:20:42EDT parameters.lisp>
;; Time-stamp: <2013-05-29 12:21:19EDT parameters.lisp>
;; Copyright 2011, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -205,6 +205,9 @@
append (list `(parameter-value ,category ,(first nv)) (second nv)))))
,@body))
(with-parameters (nf (no-units t))
(foorbar))
#+(or)
(with-parameters (:nf (:style 44))
(foobar (parameter-value :nf :style)))
......@@ -226,11 +229,12 @@
(if category
(if name
(let ((par (find-parameter category name)))
(format stream "~&~a: ~a~&Type is ~s,~&Current value is ~s."
par
(documentation par 'variable)
(get par :type)
(symbol-value par)))
(when par
(format stream "~&~a: ~a~&Type is ~s,~&Current value is ~s."
par
(documentation par 'variable)
(get par :type)
(symbol-value par))))
(format stream "~&Parameters in ~a: ~a"
category
(format-list (mapcar 'symbol-name (parameter-list category)) nil)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment