Search found 4 matches
- Wed Mar 23, 2011 3:41 am
- Forum: Common Lisp
- Topic: Alternative (MACROEXPAND ...)
- Replies: 4
- Views: 8946
Re: Alternative (MACROEXPAND ...)
If it's any help, here's two functions I find useful for debugging macros: (defun macroexpand-n (n body) "Return `body' macroexpanded `n' times." (let ((body-exp (macroexpand-1 body))) (if (= 1 n) body-exp (macroexpand-n (1- n) body-exp)))) (defun macroexpand-loop (body) "Continuously...
- Wed Nov 17, 2010 8:24 am
- Forum: Common Lisp
- Topic: How deep is a list?
- Replies: 4
- Views: 9320
Re: How deep is a list?
Firstly, commas don't get included in lists in Lisp - instead of "( ( ) , ( ( ) ( ) ) , ( ( ( ( ) ) ) ) )" it's "( ( ) ( ( ) ( ) ) ( ( ( ( ) ) ) ) )". Secondly, that is not a function, it's a list. Also, you use "else" in an "if" and use closing parentheses as...
- Sun Nov 14, 2010 4:14 pm
- Forum: Emacs
- Topic: macroexpand-1 and pretty-printing in SLIME
- Replies: 2
- Views: 12477
Re: macroexpand-1 and pretty-printing in SLIME
That seems to have done the trick - I was just using (slime-setup). Much nicer now. Cheers!Ramarren wrote: I initialize slime with (possibly redundant):Code: Select all
(slime-setup '(slime-fancy slime-autodoc slime-asdf slime-banner slime-indentation))
- Sun Nov 14, 2010 1:53 pm
- Forum: Emacs
- Topic: macroexpand-1 and pretty-printing in SLIME
- Replies: 2
- Views: 12477
macroexpand-1 and pretty-printing in SLIME
Hi there. I can't seem to get pretty-printing to work in slime or "regular" lisp. I try just doing (macroepand-1 '(macro etc.)) at the REPL, as well as C-c RET at an expression I want to see expanded, but it always prints the macro expansion on a single line. I checked *print-pretty* and i...