Skip to content
  • Jon Oddie's avatar
    Add `slime-macrostep' contrib. · 837ffe76
    Jon Oddie authored and Luís Oliveira's avatar Luís Oliveira committed
    Provide slightly fancier in-place macroexpansion by integrating with the
    `macrostep.el' library originally written for Emacs Lisp.  This commit
    is a squashed version of work co-authored with Luís Oliveira
    <luismbo@gmail.com>.
    
    * lib/macrostep.el: New file.  This is a bundled version of the library
    developed at http://github.com/joddie/macrostep and also available via
    MELPA.  The bundled copy will be used as a fallback if it is not
    installed separately.
    
    * contrib/slime-macrostep.el: New file.
    * contrib/swank-macrostep.lisp: New file.
    * contrib/test/slime-macrostep-tests.el: New file.
    * contrib/slime-fancy.el (slime-fancy): Add `slime-macrostep'.
    
    * swank/backend.lisp (call-with-macro-form-collector): New function.
    (with-collected-macro-forms): Use it.  Also, optionally bind a
    variable to the result of INSTRUMENTED-FORM.
    (collect-macro-forms): Replace let+setq with the new
    WITH-COLLECTED-MACRO-FORMS syntax.
    
    * swank/sbcl.lisp (collect-macro-forms): SBCL implementation using a
      code-walker.
    * swank/abcl.lisp (collect-macro-forms): ABCL implementation
      using WITH-COLLECTED-MACRO-FORMS.
    * swank/clisp.lisp (collect-macro-forms): CLISP implementation using
      WITH-COLLECTED-MACRO-FORMS.
    
    * swank-loader.lisp (*contribs*): Add `swank-macrostep'.
    837ffe76