[slime-devel] Macroexpand in "wrong" package?

I'm using latest CVS slime + Lispworks on Linux. Even after doing a SLIME-REPL-SET-PACKAGE to the correct package, macroexpanding a form produces an expansion which is being printed from the CL-USER package; e.g. C-c <RET> with point at start of (define-action-button modify-traffic-button :display-name "Modify Rates" :operation modify-traffic-op) Yields this: (XOS::DEFINE-ACTION-BUTTON-WIDGET XOS::MODIFY-TRAFFIC-BUTTON "Modify Rates" XOS::MODIFY-TRAFFIC-OP T NIL (LAMBDA (XOS::OPERAND) (XOS::INVOKE-OPERATION-SCRIPT 'XOS::MODIFY-TRAFFIC-OP XOS::OPERAND NIL))) I _know_ I'm in the darn XOS package already, so I'd prefer to see the expansion you get if you type (pprint (macroexpand '(define-action-button modify-traffic-button :display-name "Modify Rates" :operation modify-traffic-op))) in the REPL; namely: (PROGN (WHEN (GET 'MODIFY-TRAFFIC-BUTTON 'HTML-WIDGET-FACTORY) (CLEAR-EXISTING-WIDGETS 'MODIFY-TRAFFIC-BUTTON)) (SETF (GET 'MODIFY-TRAFFIC-BUTTON 'HTML-WIDGET-FACTORY) (LAMBDA () (MAKE-INSTANCE 'ACTION-BUTTON-WIDGET :NAME "Modify Rates" :OPERATION 'MODIFY-TRAFFIC-OP :DISABLED-MESSAGE (CANONICALIZE-TO-FUNCTION NIL) :ENABLED-P (CANONICALIZE-TO-FUNCTION T) :JSCRIPT-CODE (LAMBDA (OPERAND) (INVOKE-OPERATION-SCRIPT 'MODIFY-TRAFFIC-OP OPERAND NIL))))) 'MODIFY-TRAFFIC-BUTTON) Any way to get this behaviour?

Alain.Picard@memetrics.com writes:
I'm using latest CVS slime + Lispworks on Linux.
Hey Alain, I have no help for you with your question but maybe you can answer this for me: how do you connect SLIME and Lispworks? I have the trial edition but can't figure out how to start it as a regular command line program which is what I assume I want. Or do you launch the IDE, start the swank server, and then connect to it? -Peter -- Peter Seibel peter@javamonkey.com Lisp is the red pill. -- John Fraser, comp.lang.lisp

Peter Seibel writes:
Alain.Picard@memetrics.com writes:
I'm using latest CVS slime + Lispworks on Linux.
Hey Alain, I have no help for you with your question but maybe you can answer this for me: how do you connect SLIME and Lispworks? I have the trial edition but can't figure out how to start it as a regular command line program which is what I assume I want. Or do you launch the IDE, start the swank server, and then connect to it?
I don't know if this will work for you, as I use the professional edition. What I do is, I deliver a "console executable" which preloads a bunch of our system; basically, our delivery script looks like this: - load corba - load sql - load patches - load local fixes - load basic system stuff which never changes then (defvar *image-name* "XOS:BIN;lw-console") (save-image *image-name* :environment :with-tty-listener :clean-down nil) Then, in my .lispworks file, I have (load "/home/ap/Lisp/slime/swank-loader.lisp") (load "/home/kooks/dev-tools/Lispworks/asdf") (pushnew "/usr/share/common-lisp/systems/" asdf:*central-registry*) Then I load slime pretty normally (as far as I know of what is "normal") with the only custom thing being: (setq inferior-lisp-program "/home/kooks/XOS/Bullseye/bin/lw-console") (which is the full path on my box to *image-name* above). The console starts up; brings up the GUI podium, loads swank, and connects to emacs. It's _marvelous_; compared to ILISP, I'm in hog heaven. I get both emacs AND all the fancy inspectors/browsers built into LW. I think the key is having an image with :environment :with-tty-listener this is what causes it to look like a "regular tty" lisp from emacs's POV. BTW; a while back, none of this was working, and what I did then was - launch my console in a shell - manually execute something like: (defun start-slime-listener () (mp:process-run-function "Swank" () #'create-swank-server 4005 :spawn)) (start-slime-listener) then in emacs do M-x slime-connect. Not as convenient, but it did work. Hope this helps. --ap

Peter Seibel <peter@javamonkey.com> writes:
Alain.Picard@memetrics.com writes:
I'm using latest CVS slime + Lispworks on Linux.
Hey Alain, I have no help for you with your question but maybe you can answer this for me: how do you connect SLIME and Lispworks? I have the trial edition but can't figure out how to start it as a regular command line program which is what I assume I want. Or do you launch the IDE, start the swank server, and then connect to it?
I think you can't have a regular command line program with the personal edition. I described what I do here http://article.gmane.org/gmane.lisp.slime.devel/615 Helmut.

Alain.Picard@memetrics.com writes:
I'm using latest CVS slime + Lispworks on Linux.
Even after doing a SLIME-REPL-SET-PACKAGE to the correct package, macroexpanding a form produces an expansion which is being printed from the CL-USER package; e.g.
Should work better the newest version. Thanks reporting it.
C-c <RET> with point at start of
Just in case someone wonders, the intended binding is C-c C-m for Macroexpand. Emacs prefers to print this as C-c RET. Helmut.
participants (3)
-
Alain.Picard@memetrics.com
-
Helmut Eller
-
Peter Seibel