Commit 3393fbce authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Started work on implementing deprecated compatibility interface by Attila Lendvai's idea.

parent 53dc14c7
......@@ -8,18 +8,26 @@
:format-control "~:@(~a~) is deprecated~:[.~;, use ~:@(~a~) instead~]"
:format-arguments (list old-name new-name new-name)))
(defmacro without-packages (&body body)
`(let ((ps:*enable-package-system* nil))
(defmacro defun-js (old-name new-name args &body body)
`(defun ,old-name ,args
,(when (and (stringp (car body)) (< 1 (length body))) ;; docstring
(car body))
(warn-deprecated ',old-name ',new-name)
(without-packages ,@body)))
(defun js-equal (a b)
(warn-deprecated 'js-equal 'script-equal)
(defun-js js-equal script-equal (a b)
(script-equal a b))
(defun js-compile (form)
(warn-deprecated 'js-compile 'compile-script)
(defun-js js-compile compile-script (form)
(compile-script form :output-spec :javascript))
(defun js-compile-list (form)
(warn-deprecated 'js-compile-list 'compile-script)
(defun-js js-compile-list compile-script (form)
(compile-script form :output-spec :javascript))
(defmacro defjsmacro (&rest args)
Supports Markdown
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