clx/input.lisp:declare-event error

Sam Steingold <[email protected]> Thu, 08 Apr 2004 18:51:37 -0400
Newsgroups gmane.lisp.clocc.devel
Organization disorganization
Message-ID <[email protected]>
CLISP cannot compile DECLARE-EVENT forms :

Compiling file input.lisp ...
WARNING in DECLARE-EVENT in lines 689..802 :
variable ENV is not used.
Misspelled or missing IGNORE declaration?
ERROR in KEY-PRESS-EVENT-GET-MACRO in lines 816..827 :
Form too short, too few arguments: (QUOTE)
ERROR in MOTION-NOTIFY-EVENT-GET-MACRO in lines 829..837 :
Form too short, too few arguments: (QUOTE)
etc

A reasonable fix to GET-MACRO is something like this:

	   (defun ,get-macro (display event-key variable)
	     ;; Note: we take pains to macroexpand the get-code here to enable application
	     ;; code to be compiled without having the CLX macros file loaded.
	     (let* ((%buffer display)
                    (buffer-bbuf ...)
                    (buffer-boffset ...))
               (declare (ignorable %buffer))
               (getf `(:display (the display ,display)
		       :event-key (the keyword ,event-key)
                       :event-code (the card8 (logand #x7f (read-card8 0)))
                       :send-event-p (logbitp 7 (read-card8 0))
                       ,,@(mapcar #'(lambda (form)
                                      (clx-macroexpand form env))
                                  get-code))
                     variable)))


question is, what do we bind BUFFER-BBUF & BUFFER-BOFFSET to?

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Trespassers will be shot.  Survivors will be SHOT AGAIN!



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click