[slime-devel] [Patch] Implementation of a macroexpansion stack.

Tobias C. Rittweiler tcr at freebits.de
Thu May 11 16:43:02 UTC 2006


Hi Slime-hackers,

I implemented the macroexpansion stack that I talked about several month
ago. With the attached patch, it's possible to press `l' (for "last",
like in the inspector) to get to the same content as of the previous
macroexpansion buffer, for example, after an in-place expansion. It also
tries to use the highlighting-edits facility in the most reasonable way
I could make out.

It's cool, man! Try it out.

  -T.

2006-05-11  Tobias Rittweiler <PUT-MY-ADDRESS-HERE>

	* slime.el (slime-use-autodoc-mode): Fix typo in docstring.

	* slime.el (slime-use-highlight-edits-mode): New variable,
	analogous to SLIME-USE-AUTODOC-MODE.
	(slime-setup, slime-lisp-mode-hook): Make above variable
	work. Also, activates the HIGHLIGHT-EDITS-MODE in proper way (thus
	avoiding the nasty "Toggling ... off; better pass an explicit
	argument." message.)

	* slime.el (with-struct-slots): Renamed from WITH-STRUCT. Also,
	changed calling semantics slightly.

	* slime.el (slime-get-temp-buffer-create): Added new keyword
	ACTIVATOR that represents a function responsible for activating a
	given buffer, supersedes the NOSELECTP keyword which got removed
	because it wasn't used anywhere. Updated docstring.
	(slime-with-output-to-temp-buffer): Likewise.

	* slime.el: Fix typo in comment about communication protocol.

	* slime.el (slime-macroexpansion-buffer-name): New variable,
	contains the name of the macroexpansion buffer.

	* slime.el: Implemented macroexpansion stack, for instance, for
	going back from an in-place macroexpansion to its originated
	expansion:
	(slime-macroexpansion-minor-mode): Pressing `l' inside the
	macroexpansion buffer, will bring the user back to the previous
	macroexpansion, if possible.
	(slime-macroexpansion-stack): New variable, the stack.
	(slime-macroexpansion-struct): Structure representing one item in
	the stack, an item contains all relevant information to restore
	the macroexpansion buffer to its prior appearance.
	(slime-eval-macroexpand-expression): Removed, because the same
	information is now stored in the stack items.
	(slime-macroexpansion-kill-buffer-finalizer): Responsible for
	clearing the stack, when the macroexpansion buffer is killed.
	(slime-update-macroexpansion-stack-top): New.
	(slime-extend-macroexpansion-stack): New.
	(with-macroexpansion-buffer): New macro, responsible for finding
	respectively creating a macroexpansion buffer that's made the
	current buffer within its scope.
	(slime-eval-macroexpand, slime-eval-macroexpand-inplace):
	Accomodated for the new macroexpansion stack.
	(slime-macroexpansion-buffer-go-back): New function, responsible
	for restoring the previous macroexpansion in the stack.
	(slime-macroexpand-again): Accomodated to macroexpansion stack.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: slime-macroexpansion-stack.diff
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20060511/1d3acecd/attachment.ksh>


More information about the slime-devel mailing list