[slime-devel] [Patch] improving interaction of macroexpansion and highlighting edits.

Tobias C. Rittweiler tcr at freebits.de
Thu May 18 15:10:38 UTC 2006


The attached patch improves the interaction between
SLIME-HIGHLIGHT-EDITS-MODE and SLIME-MACROEXPANSION-MINOR-MODE such that
macroexpanding in-place will highlight the affected region only. Same
happens when going-back to the previous macroexpansion by `undo'.

It depends on my last patch which introduces the global variable
SLIME-USE-HIGHLIGH-EDITS-MODE.


One issue remains: As of now, it's possible to get to an empty
Macroexpansion Buffer by `undo'. I have a local hack that all it
basically does, is

  (remap 'undo (lambda (arg)
                 ...
                 (undo arg)
                 (when (zerop (buffer-size)) (redo))))

Though, as you see, that makes use of redo.el which is not part of
standard Emacs, unfortunately.


2006-05-18  Tobias C. Rittweiler <PUT-MY-ADDRESS-HERE>

	* slime.el (slime-get-temp-buffer-create): New keyword REUSEP
	which indicates whether an already-existing buffer named like the
	buffer to be created should be reused, i.e. not killed, then
	freshly created. Update docstring accordingly.
	(slime-with-output-to-temp-buffer): Make &optional arg MODE an
	&key keyword arg. Add REUSEP keyword.

	* slime.el (slime-macroexpansion-minor-mode-map): Make remapped
	`undo' update highlighted edits in the macroexpansion buffer.
	(slime-eval-macroexpand-in-place): Update highlighted edits when
	macroexpanding in-place.
	(slime-eval-macroexpand): Reuse macroexpansion buffer if it exists
	already to preserve `undo' functionality.


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


More information about the slime-devel mailing list