X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=dev%2Fgraphviz%2Fgraphviz-support.lisp;h=b51127954b94802eb2be1e09b544dd9da3a6182d;hb=63b8fd870436113d8d196d94f1e6f2eabfe7f786;hp=aec3b994ab5297c1d27fc97637c3e29a0be80cda;hpb=967f37e2d82bf3bcf47a644686eed00e293b50aa;p=cl-graph.git diff --git a/dev/graphviz/graphviz-support.lisp b/dev/graphviz/graphviz-support.lisp index aec3b99..b511279 100644 --- a/dev/graphviz/graphviz-support.lisp +++ b/dev/graphviz/graphviz-support.lisp @@ -352,13 +352,13 @@ B--D [] (getf (dot-attributes thing) attr)) (defmacro defpixel-inch-accessors (name attr type) - (bind ((actual-name (form-symbol name "-IN-PIXELS"))) + (let ((actual-name (form-symbol name "-IN-PIXELS"))) `(progn - (export ',actual-name) + (eval-always (export ',actual-name)) (defmethod ,actual-name ((thing ,type)) "Return the attribute in pixels assuming 72 dpi" - (awhen (dot-attribute-value ,attr thing) - (* 72 it))) + (when (dot-attribute-value ,attr thing) + (* 72 (dot-attribute-value ,attr thing)))) (defmethod (setf ,actual-name) (value (thing ,type)) "Set the attribute in pixels assuming 72 dpi" (setf (dot-attribute-value ,attr thing) @@ -497,9 +497,10 @@ B--D [] (defmethod graph->dot-external ((g basic-graph) file-name &key (type :ps)) "Generate an external represenation of a graph to a file, by running the program in *dot-path*." + (declare (ignorable file-name)) (let ((dot-string (graph->dot g nil)) (dot-type (concatenate 'string "-T" (string-downcase (symbol-name type))))) - (declare (ignorable dot-string dot-type file-name)) + (declare (ignorable dot-string dot-type)) #+lispworks (with-open-stream (s (sys:open-pipe (concatenate 'string *dot-path* " -Tpng -o" file-name) :direction :input))