From ef848625460ba54527845a730e4ba85886420cdc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alejandro=20R=20Sede=C3=B1o?= Date: Thu, 7 Mar 2013 13:30:31 -0500 Subject: [PATCH] asdf-support: simplify do-process-import calling --- asdf-support.lisp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/asdf-support.lisp b/asdf-support.lisp index 24fc7e7..4f57a85 100644 --- a/asdf-support.lisp +++ b/asdf-support.lisp @@ -236,14 +236,10 @@ If the file is a .proto file, it first parses it and writes a .lisp file. The .lisp file is the compiled and loaded." (dolist (import imports) - (block import-one - (let* ((import (pathname import)) - (import-name (pathname-name import)) - (proto-file (do-process-import import import-name)) - (imported (find-schema proto-file))) - (when imported - (appendf (proto-imported-schemas schema) (list imported))) - (return-from import-one))))) + (let* ((proto-file (do-process-import (pathname import))) + (imported (find-schema proto-file))) + (when imported + (appendf (proto-imported-schemas schema) (list imported)))))) (defun process-imports-from-file (imports-file) (when (probe-file imports-file) @@ -253,15 +249,14 @@ :element-type 'character) (with-standard-io-syntax (read stream))))) (dolist (import imports) - (let* ((import (pathname import)) - (import-name (pathname-name import))) - (do-process-import import import-name)))))) + (do-process-import (pathname import)))))) -(defun do-process-import (import import-name +(defun do-process-import (import &key (search-path *protobuf-search-path*) (output-path *protobuf-output-path*)) (dolist (path search-path (error "Could not import ~S" import)) (let* ((base-path (asdf::merge-pathnames* import path)) + (import-name (pathname-name import)) (proto-file (make-pathname :name import-name :type "proto" :defaults base-path)) (lisp-file (if output-path -- 2.45.2