(document.write
(ps-html ((:a :href "#"
- :onclick (lisp (ps-inline (transport)))) "link")))
-=> document.write('<A HREF=\"#\" ONCLICK=\"' + 'javascript:transport()' + '\">link</A>')
+ :onclick (ps-inline (transport))) "link")))
+=> document.write('<A HREF=\"#\" ONCLICK=\"' + ('javascript:' + 'transport()') + '\">link</A>')
;;; Forms may be used in attribute lists to conditionally generate
;;; the next attribute. In this example the textarea is sometimes disabled.
(defun ps-inline* (form &optional (*js-string-delimiter* *js-inline-string-delimiter*))
(concatenate 'string "javascript:" (ps1* form)))
-(defmacro ps-inline (form &optional (string-delimiter '*js-inline-string-delimiter*))
- `(let ((*js-string-delimiter* ,string-delimiter))
- (concatenate 'string "javascript:" ,@(parenscript-print (compile-parenscript-form form :expecting :statement)))))
+(defmacro/ps ps-inline (form &optional (string-delimiter *js-inline-string-delimiter*))
+ `(concatenate 'string "javascript:"
+ ,@(let ((*js-string-delimiter* string-delimiter))
+ (parenscript-print (compile-parenscript-form form :expecting :statement)))))
(document.write
(if (= *linkornot* 1)
(ps-html ((:a :href "#"
- :onclick (lisp (ps-inline (transport))))
+ :onclick (ps-inline (transport)))
img))
img))
- "document.write(LINKORNOT == 1 ? '<A HREF=\"#\" ONCLICK=\"' + 'javascript:transport()' + '\">' + img + '</A>' : img)")
+ "document.write(LINKORNOT == 1 ? '<A HREF=\"#\" ONCLICK=\"' + ('javascript:' + 'transport()') + '\">' + img + '</A>' : img)")
(test-ps-js negate-number-literal ;; ok, this was broken and fixed before, but no one bothered to add the test!
(- 1)
(test-ps-js the-html-generator-3
(document.write
(ps-html ((:a :href "#"
- :onclick (lisp (ps-inline (transport)))) "link")))
- "document.write('<A HREF=\"#\" ONCLICK=\"' + 'javascript:transport()' + '\">link</A>')")
+ :onclick (ps-inline (transport))) "link")))
+ "document.write('<A HREF=\"#\" ONCLICK=\"' + ('javascript:' + 'transport()') + '\">link</A>')")
(test-ps-js the-html-generator-4
(let* ((disabled nil)