branch: elpa/macrostep
commit 9a534df7a47659b2f4cadd565d412b4a32e8372d
Author: Luís Oliveira <[email protected]>
Commit: Luís Oliveira <[email protected]>
Make macrostep-slime-insert more robust
* macrostep.el (macrostep-slime-insert): Don't assume `forward-sexp'
knows how to jump over the expansion and store the point after
insertion instead.
---
macrostep.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/macrostep.el b/macrostep.el
index 80ef41a..467d878 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -926,11 +926,13 @@ expansion will not be fontified. See also
(defun macrostep-slime-insert (expansion)
"Insert EXPANSION at point, indenting to match the current column."
(let* ((indent-string (concat "\n" (make-string (current-column) ? )))
- (expansion (replace-regexp-in-string "\n" indent-string expansion)))
+ (expansion (replace-regexp-in-string "\n" indent-string expansion))
+ (end-point))
(save-excursion
- (insert expansion))
+ (insert expansion)
+ (setq end-point (point)))
(macrostep-slime--propertize-macros)
- (forward-sexp)))
+ (goto-char end-point)))
(defun macrostep-slime--propertize-macros ()
"Put text properties on macros in the form following point."