Commit 8510ebaf authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Renamed concat-string to stringify

parent e8913af7
......@@ -79,6 +79,7 @@ is output to the OUTPUT-STREAM stream."
(defpsmacro-deprecated === eql)
(defpsmacro-deprecated == equal)
(defpsmacro-deprecated % rem)
(defpsmacro-deprecated concat-string stringify)
(defpsmacro !== (&rest args)
(warn-deprecated '!==)
......@@ -95,3 +96,7 @@ is output to the OUTPUT-STREAM stream."
(defpsmacro do-set-timeout ((timeout) &body body)
(warn-deprecated 'do-set-timeout 'set-timeout)
`(set-timeout (lambda () ,@body) ,timeout))
(defun concat-string (&rest things)
(warn-deprecated 'concat-string 'stringify)
(apply #'stringify things))
......@@ -40,7 +40,7 @@
attr-val (pop attrs))
(if attr-test
(push `(if ,attr-test
(concat-string ,(format nil " ~A=\"" attr-name) ,attr-val "\"")
(stringify ,(format nil " ~A=\"" attr-name) ,attr-val "\"")
"")
r)
(progn
......@@ -96,7 +96,7 @@
(concat-constant-strings (reverse r)))))
(defmacro+ps ps-html (&rest html-forms)
`(concat-string ,@(process-html-forms-lhtml html-forms)))
`(stringify ,@(process-html-forms-lhtml html-forms)))
(defmacro+ps who-ps-html (&rest html-forms)
`(concat-string ,@(process-html-forms-cl-who html-forms)))
`(stringify ,@(process-html-forms-cl-who html-forms)))
......@@ -400,11 +400,11 @@ lambda-list::=
(assert (equal result-type ''string) () "Right now Parenscript 'concatenate' only support strings.")
(cons '+ sequences))
(defmacro concat-string (&rest things)
(defun stringify (&rest things)
"Like concatenate but prints all of its arguments."
`(format nil "~@{~A~}" ,@things))
(format nil "~{~A~}" things))
(defpsmacro concat-string (&rest things)
(defpsmacro stringify (&rest things)
(if (and (= (length things) 1) (stringp (car things)))
(car things)
`((@ (list ,@things) :join) "")))
......
......@@ -66,6 +66,7 @@
#:!==
#:labeled-for
#:do-set-timeout
#:concat-string
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Language
......@@ -250,7 +251,7 @@
#:random
#:ignore-errors
#:concatenate
#:concat-string
#:stringify
#:length
#:defined
#:undefined
......
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