Changed html -> ps-html; reorganized packages.lisp exports.
authorVladimir Sedach <vsedach@gmail.com>
Mon, 20 Aug 2007 20:40:42 +0000 (20:40 +0000)
committerVladimir Sedach <vsedach@gmail.com>
Mon, 20 Aug 2007 20:40:42 +0000 (20:40 +0000)
Using 'html' creates a conflict with any number of existing html
generation libraries.

src/lib/js-html.lisp
src/package.lisp

index 8f9920b..8f574cc 100644 (file)
@@ -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)
index 29c6d64..04fc9c3 100644 (file)
@@ -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
       
       #:instanceof
       #:new
       
-      ;; assignment
+      ;; assignment and binding
       #:setf
+      #:defaultf
+      #:defsetf
+      #:let
       
       ;; variables
       #:defvar
       #: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