branch: elpa/macrostep
commit 0c8b64c0fcb57c8cc573e3c0a300d01dbd1b98a6
Author: Luís Oliveira <[email protected]>
Commit: Luís Oliveira <[email protected]>
Position macrostep-slime-macro-form-p in the correct package
* macrostep.el (macrostep-slime-macro-form-p): Use
SWANK::WITH-BUFFER-SYNTAX to bind *PACKAGE* to the right thing and
other similar moves.
---
macrostep.el | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/macrostep.el b/macrostep.el
index 32aa72a..80ef41a 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -960,20 +960,21 @@ expansion will not be fontified. See also
(defun macrostep-slime-macro-form-p (form)
(slime-eval
- `(cl:let ((sexp (cl:read-from-string ,form))
- (expand-compiler-macros ,macrostep-expand-compiler-macros))
- (cl:cond
- ((cl:not (cl:consp sexp))
- nil)
- ((cl:eq (cl:car sexp) 'cl:lambda)
- nil)
- ((cl:macro-function (cl:car sexp))
- 'macro)
- ((cl:and expand-compiler-macros
- (cl:compiler-macro-function (cl:car sexp)))
- 'compiler-macro)
- (t
- nil)))))
+ `(swank::with-buffer-syntax ()
+ (cl:let ((sexp (cl:read-from-string ,form))
+ (expand-compiler-macros ,macrostep-expand-compiler-macros))
+ (cl:cond
+ ((cl:not (cl:consp sexp))
+ nil)
+ ((cl:eq (cl:car sexp) 'cl:lambda)
+ nil)
+ ((cl:macro-function (cl:car sexp))
+ 'macro)
+ ((cl:and expand-compiler-macros
+ (cl:compiler-macro-function (cl:car sexp)))
+ 'compiler-macro)
+ (t
+ nil))))))
(provide 'macrostep)