javascriptlispcommon-lispparenscript

parenscript symbol not recognize in emacs+slime


I try to redo parenscript example. I perform the following command in emacs+sbcl+slime:

(ql:quickload :parenscript)
(defpackage :test)
  (:use :cl :parenscript))
(in-package :test)

Then I compile the example:

(defun validate-game-name (evt)
 (when (= (@ add-form name value) "")
  (chain evt (prevent-default))
  (alert "Please enter a name.")))

and got the following error:

style-warning: undefined function: @
warning: undefined variable: ADD-FORM
warning: undefined variable: NAME
warning: undefined variable: VALUE

What is wrong here?


Solution

  • OK. Following Philipp's comment, i get it to compile in context with:

    (ps
      (defun validate-game-name (evt)
      (when (= (@ add-form name value) "")
      (chain evt (prevent-default))
      (alert "Please enter a name."))))