From: Vladimir Sedach Date: Mon, 20 Aug 2007 20:40:42 +0000 (+0000) Subject: Changed html -> ps-html; reorganized packages.lisp exports. X-Git-Tag: parenscript-20070828~21 X-Git-Url: http://git.hcoop.net/clinton/parenscript.git/commitdiff_plain/d31d0bc7cd170cccda90c46655b513d5e68c904b?hp=2e593e4c004f3cf6e31c0cf10b0c038423160ed0 Changed html -> ps-html; reorganized packages.lisp exports. Using 'html' creates a conflict with any number of existing html generation libraries. --- diff --git a/src/lib/js-html.lisp b/src/lib/js-html.lisp index 8f9920b..8f574cc 100644 --- a/src/lib/js-html.lisp +++ b/src/lib/js-html.lisp @@ -1,5 +1,4 @@ -;; Description: -;; Javascript html generator +;;; Macros for generating HTML from ParenScript code. (in-package :parenscript) @@ -71,7 +70,7 @@ (map nil #'handle-form forms)) (cons '+ (optimize-string-list (nreverse res))))) -(define-ps-special-form html (expecting &rest forms) +(define-ps-special-form ps-html (expecting &rest forms) (compile-parenscript-form (process-html-forms forms))) (defun process-css-forms (proplist) diff --git a/src/package.lisp b/src/package.lisp index 29c6d64..04fc9c3 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -1,10 +1,7 @@ (in-package :cl-user) -;;;; Package definitions for the Parenscript -;; #: -(eval-when (:compile-toplevel :load-toplevel) - ;; exports shared between PARENSCRIPT and PARENSCRIPT.JAVASCRIPT - (defparameter *shared-symbols-ps-js* +(eval-when (:compile-toplevel :load-toplevel :execute) + (defparameter *parenscript-lang-exports* '( ;; literals #:t @@ -42,7 +39,6 @@ #:\|\| #:or #:>>= #:<<= #:*= #:/= #:%= #:+= #:\&= #:^= #:\|= #:~= - #:++ #:-- #:1+ #:1- #:incf #:decf @@ -73,8 +69,11 @@ #:instanceof #:new - ;; assignment + ;; assignment and binding #:setf + #:defaultf + #:defsetf + #:let ;; variables #:defvar @@ -99,78 +98,64 @@ #:regex ;; conditional compilation (IE) - #:cc-if) - "Symbols exported from both the Parenscript and Javascript packages -that are also valid as Parenscript symbols for the corresponding script packages.")) - -(eval-when (:compile-toplevel :load-toplevel :execute) - (defparameter *parenscript-lang-exports* - (append - *shared-symbols-ps-js* - '( - ;; function definition - #:defun - #:lambda + #:cc-if + + ;; function definition + #:defun + #:lambda - ;; lambda lists - #:&key - #:&rest - #:&body - #:&optional - #:&aux - #:&environment - #:&key-object + ;; lambda lists + #:&key + #:&rest + #:&body + #:&optional + #:&aux + #:&environment + #:&key-object - ;; slot access - #:with-slots - #:slot-value + ;; slot access + #:with-slots + #:slot-value - ;; macros - #:macrolet - #:symbol-macrolet - #:define-symbol-macro - #:define-script-symbol-macro - #:defmacro - - ;; lisp eval - #:lisp + ;; macros + #:macrolet + #:symbol-macrolet + #:define-symbol-macro + #:define-script-symbol-macro + #:defmacro - ;; assignment - #:setf - #:defaultf - - #:let + ;; lisp eval + #:lisp - ;; iteration - #:do - #:dotimes - #:dolist - #:doeach - #:while + ;; iteration + #:do + #:dotimes + #:dolist + #:doeach + #:while - ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v + ;; v v v STUFF WE SHOULD PROBABLY MOVE TO OTHER LIBS v v v - ;; CSS - #:css - #:css-to-string - #:css-inline - #:css-file + ;; CSS + #:css + #:css-to-string + #:css-inline + #:css-file - ;; html generator for javascript - #:html + ;; html generator for javascript + #:ps-html - ;; utils - #:do-set-timeout - )) - "List of (uninterned) symbols. Contains all symbols considerred -part of the Parenscript language. These should be exported within -both the Lisp package and the script package for Parenscript.")) + ;; utils + #:do-set-timeout + )) + "All symbols considerred part of the Parenscript language.") (defpackage :parenscript (:use :common-lisp) (:nicknames :js :ps) - #.(cons :export *shared-symbols-ps-js*) #.(cons :export *parenscript-lang-exports*) + + ;;; symbols that form the interface to the Parenscript compiler (:export ;; compiler #:compile-script