                         (return (cdr (assoc "switches" x))))))
           ",")))
 
-(defun* wandbox-build-request-data (&rest profile &key lang name file &allow-other-keys)
-  "Build JSON data to post to Wandox API.
-PROFILE is property list. e.g. (:compiler COMPILER-NAME :options OPTS ...)"
-  (setq profile
-        (wandbox-merge-plist profile
-                             (if lang (wandbox-find-profile :lang lang))
-                             (if name (wandbox-find-profile :name name))
-                             (if (and file (file-exists-p file))
-                                 (wandbox-fetch-as-profile file))))
-  (dolist (f wandbox-precompiled-hook)
-    (setq profile (wandbox-merge-plist profile (apply f profile))))
-
+(defsubst wandbox--merge-profile (profile &rest functions)
+  (let ((p (copy-sequence profile)))
+    (dolist (f functions p)
+      (setq p (wandbox-merge-plist p (apply f p))))))
+
+(defun* wandbox-build-request-data-raw (&rest profile
+                                        &key compiler options code stdin save
+                                             compiler-option runtime-option
+                                        &allow-other-keys)
   (labels ((join-as-string (list separator)
              (mapconcat #'(lambda (x) (format "%s" x)) list separator))
            (val (x)

      (loop for (key value) on plist by #'cddr
            do (plist-put result key value)))
    result))

(defsubst wandbox--log (format &rest args)
  (let ((msg (apply #'format format args)))

  (declare (indent 1))
  (let ((print-circle t))
    `(wandbox-compile :name "CLISP"
                      :code ,(prin1-to-string
                              `(let ((*print-circle* t))
                                 (format t "~{~s~^ ;~%~}"
                                         (multiple-value-list (progn ,@form)))))
                      ,@options)))

;;;###autoload
