Commit 1bbc7a5a authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Move with-asdf-syntax from find-system to lisp-action

parent 40e74ca5
......@@ -8,7 +8,6 @@
:asdf/find-component :asdf/system-registry :asdf/plan :asdf/operate)
(:import-from #:asdf/component #:%additional-input-files)
(:export
#:call-with-asdf-syntax #:with-asdf-syntax
#:find-system #:locate-system #:load-asd #:define-op
#:load-system-definition-error #:error-name #:error-pathname #:error-condition))
(in-package :asdf/find-system)
......@@ -44,17 +43,6 @@
;; the precise protocol between the two functions may change in the future (or not).
(first (gethash `(find-system ,(coerce-name name)) (asdf-cache))))
(defun call-with-asdf-syntax (function &key package)
(with-standard-io-syntax
(let ((*readtable* *shared-readtable*)
(*print-pprint-dispatch* *shared-print-pprint-dispatch*)
(*package* (find-package (or package :asdf-user)))
(*print-readably* nil))
(call-function function))))
(defmacro with-asdf-syntax ((&key package) &body body)
`(call-with-asdf-syntax #'(lambda () ,@body) :package ,package))
(defclass define-op (non-propagating-operation) ()
(:documentation "An operation to record dependencies on loading a .asd file."))
......
......@@ -6,6 +6,7 @@
(:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/session
:asdf/component :asdf/system :asdf/operation :asdf/action)
(:export
#:call-with-asdf-syntax #:with-asdf-syntax
#:try-recompiling
#:cl-source-file #:cl-source-file.cl #:cl-source-file.lsp
#:basic-load-op #:basic-compile-op
......@@ -16,6 +17,18 @@
#:lisp-compilation-output-files))
(in-package :asdf/lisp-action)
;;;; Syntax control
(with-upgradability ()
(defun call-with-asdf-syntax (function &key package)
(with-standard-io-syntax
(let ((*readtable* *shared-readtable*)
(*print-pprint-dispatch* *shared-print-pprint-dispatch*)
(*package* (find-package (or package :asdf-user)))
(*print-readably* nil))
(call-function function))))
(defmacro with-asdf-syntax ((&key package) &body body)
`(call-with-asdf-syntax #'(lambda () ,@body) :package ,package)))
;;;; Component classes
(with-upgradability ()
......
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